summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDaniel Vos <45820840+vosdev@users.noreply.github.com>2021-01-19 03:05:11 +0100
committerGitHub <noreply@github.com>2021-01-18 21:05:11 -0500
commit185c5ae2c468c71e08649b619185bad5959c0c57 (patch)
treef35637d6127bed6cc4ee447e2c45ee4a2871336a /docs
parentb4dc080c96a746e00f4b7d6746b4485b1ed8b577 (diff)
downloadgitea-185c5ae2c468c71e08649b619185bad5959c0c57.tar.gz
gitea-185c5ae2c468c71e08649b619185bad5959c0c57.zip
Update back-up restore example for 1.13 changes (#14374)
Signed-off-by: Daniël Vos <danielvos@outlook.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/usage/backup-and-restore.en-us.md22
-rw-r--r--docs/content/doc/usage/backup-and-restore.zh-cn.md24
-rw-r--r--docs/content/doc/usage/backup-and-restore.zh-tw.md20
3 files changed, 49 insertions, 17 deletions
diff --git a/docs/content/doc/usage/backup-and-restore.en-us.md b/docs/content/doc/usage/backup-and-restore.en-us.md
index 5e822dc05e..fb0216cd1f 100644
--- a/docs/content/doc/usage/backup-and-restore.en-us.md
+++ b/docs/content/doc/usage/backup-and-restore.en-us.md
@@ -72,15 +72,21 @@ involves moving files to their correct locations and restoring a database dump.
Example:
```sh
-apt-get install gitea
-unzip gitea-dump-1482906742.zip
-cd gitea-dump-1482906742
-mv custom/conf/app.ini /etc/gitea/conf/app.ini # or mv app.ini /etc/gitea/conf/app.ini
-unzip gitea-repo.zip
-mv gitea-repo/* /var/lib/gitea/repositories/
-chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea/repositories/
+unzip gitea-dump-1610949662.zip
+cd gitea-dump-1610949662
+mv data/conf/app.ini /etc/gitea/conf/app.ini
+mv data/* /var/lib/gitea/data/
+mv log/* /var/lib/gitea/log/
+mv repos/* /var/lib/gitea/repositories/
+chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea
+
+# mysql
mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql
-# or sqlite3 $DATABASE_PATH <gitea-db.sql
+# sqlite3
+sqlite3 $DATABASE_PATH <gitea-db.sql
+# postgres
+psql -U $USER -d $DATABASE < gitea-db.sql
+
service gitea restart
```
diff --git a/docs/content/doc/usage/backup-and-restore.zh-cn.md b/docs/content/doc/usage/backup-and-restore.zh-cn.md
index c3baae25e4..43ad108d95 100644
--- a/docs/content/doc/usage/backup-and-restore.zh-cn.md
+++ b/docs/content/doc/usage/backup-and-restore.zh-cn.md
@@ -46,15 +46,21 @@ Gitea 已经实现了 `dump` 命令可以用来备份所有需要的文件到一
例如:
-```
-apt-get install gitea
-unzip gitea-dump-1482906742.zip
-cd gitea-dump-1482906742
-mv custom/conf/app.ini /etc/gitea/conf/app.ini
-unzip gitea-repo.zip
-mv gitea-repo/* /var/lib/gitea/repositories/
-chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea/repositories/
+```sh
+unzip gitea-dump-1610949662.zip
+cd gitea-dump-1610949662
+mv data/conf/app.ini /etc/gitea/conf/app.ini
+mv data/* /var/lib/gitea/data/
+mv log/* /var/lib/gitea/log/
+mv repos/* /var/lib/gitea/repositories/
+chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea
+
+# mysql
mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql
-# or sqlite3 $DATABASE_PATH <gitea-db.sql
+# sqlite3
+sqlite3 $DATABASE_PATH <gitea-db.sql
+# postgres
+psql -U $USER -d $DATABASE < gitea-db.sql
+
service gitea restart
```
diff --git a/docs/content/doc/usage/backup-and-restore.zh-tw.md b/docs/content/doc/usage/backup-and-restore.zh-tw.md
index 0dfdeede7e..152d0a19b7 100644
--- a/docs/content/doc/usage/backup-and-restore.zh-tw.md
+++ b/docs/content/doc/usage/backup-and-restore.zh-tw.md
@@ -43,3 +43,23 @@ Gitea 目前支援 `dump` 指令,用來將資料備份成 zip 檔案,後續
## 還原指令 (`restore`)
持續更新中: 此文件尚未完成.
+
+例:
+```sh
+unzip gitea-dump-1610949662.zip
+cd gitea-dump-1610949662
+mv data/conf/app.ini /etc/gitea/conf/app.ini
+mv data/* /var/lib/gitea/data/
+mv log/* /var/lib/gitea/log/
+mv repos/* /var/lib/gitea/repositories/
+chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea
+
+# mysql
+mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql
+# sqlite3
+sqlite3 $DATABASE_PATH <gitea-db.sql
+# postgres
+psql -U $USER -d $DATABASE < gitea-db.sql
+
+service gitea restart
+```