docs: add zh-tw folder (#195)

Signed-off-by: appleboy <appleboy.tw@gmail.com>
Reviewed-on: https://gitea.com/gitea/docs/pulls/195
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2025-04-04 23:28:16 +00:00
committed by Lunny Xiao
parent 3275094871
commit dbfa0ba454
835 changed files with 72590 additions and 5155 deletions

View File

@@ -5,12 +5,11 @@ sidebar_position: 11
aliases:
- /zh-cn/backup-and-restore
---
# 备份与恢复
Gitea 已经实现了 `dump` 命令可以用来备份所有需要的文件到一个zip压缩文件。该压缩文件可以被用来进行数据恢复。
Gitea 已经实现了 `dump` 命令可以用来备份所有需要的文件到一个 zip 压缩文件。该压缩文件可以被用来进行数据恢复。
## 备份一致性
@@ -20,7 +19,7 @@ Gitea 包括数据库、文件和 Git 仓库,当它被使用时所有这些都
## 备份命令 (`dump`)
先转到git用户的权限: `su git`. 再Gitea目录运行 `./gitea dump`。一般会显示类似如下的输出:
先转到 git 用户的权限: `su git`. 再 Gitea 目录运行 `./gitea dump`。一般会显示类似如下的输出:
```
2016/12/27 22:32:09 Creating tmp work dir: /tmp/gitea-dump-417443001
@@ -33,12 +32,12 @@ Gitea 包括数据库、文件和 Git 仓库,当它被使用时所有这些都
最后生成的 `gitea-dump-1482906742.zip` 文件将会包含如下内容:
* `app.ini` - 如果原先存储在默认的 custom/ 目录之外,则是配置文件的可选副本
* `custom/` - 所有保存在 `custom/` 目录下的配置和自定义的文件。
* `data/` - 数据目录APP_DATA_PATH如果使用文件会话则不包括会话。该目录包括 `attachments``avatars``lfs``indexers`、如果使用 SQLite 则包括 SQLite 文件。
* `repos/` - 仓库目录的完整副本。
* `gitea-db.sql` - 数据库dump出来的 SQL。
* `log/` - Logs文件如果用作迁移不是必须的。
- `app.ini` - 如果原先存储在默认的 custom/ 目录之外,则是配置文件的可选副本
- `custom/` - 所有保存在 `custom/` 目录下的配置和自定义的文件。
- `data/` - 数据目录APP_DATA_PATH如果使用文件会话则不包括会话。该目录包括 `attachments``avatars``lfs``indexers`、如果使用 SQLite 则包括 SQLite 文件。
- `repos/` - 仓库目录的完整副本。
- `gitea-db.sql` - 数据库 dump 出来的 SQL。
- `log/` - Logs 文件,如果用作迁移不是必须的。
中间备份文件将会在临时目录进行创建,如果您要重新指定临时目录,可以用 `--tempdir` 参数,或者用 `TMPDIR` 环境变量。
@@ -53,7 +52,7 @@ mysqldump -u$USER -p$PASS --database $DATABASE > gitea-db.sql
pg_dump -U $USER $DATABASE > gitea-db.sql
```
### 使用Docker `dump`
### 使用 Docker `dump`
在使用 Docker 时,使用 `dump` 命令有一些注意事项。