diff options
Diffstat (limited to 'docs/content/doc/usage/backup-and-restore.en-us.md')
-rw-r--r-- | docs/content/doc/usage/backup-and-restore.en-us.md | 22 |
1 files changed, 13 insertions, 9 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 cefdf5d3da..5e822dc05e 100644 --- a/docs/content/doc/usage/backup-and-restore.en-us.md +++ b/docs/content/doc/usage/backup-and-restore.en-us.md @@ -3,7 +3,7 @@ date: "2017-01-01T16:00:00+02:00" title: "Usage: Backup and Restore" slug: "backup-and-restore" weight: 11 -toc: true +toc: false draft: false menu: sidebar: @@ -18,6 +18,10 @@ menu: Gitea currently has a `dump` command that will save the installation to a zip file. This file can be unpacked and used to restore an instance. +**Table of Contents** + +{{< toc >}} + ## Backup Command (`dump`) Switch to the user running Gitea: `su git`. Run `./gitea dump -c /path/to/app.ini` in the Gitea installation @@ -34,12 +38,12 @@ directory. There should be some output similar to the following: Inside the `gitea-dump-1482906742.zip` file, will be the following: -* `app.ini` - Optional copy of configuration file if originally stored outside of the default `custom/` directory -* `custom` - All config or customization files in `custom/`. -* `data` - Data directory in <GITEA_WORK_DIR>, except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, sqlite file if you are using sqlite. -* `gitea-db.sql` - SQL dump of database -* `gitea-repo.zip` - Complete copy of the repository directory. -* `log/` - Various logs. They are not needed for a recovery or migration. +- `app.ini` - Optional copy of configuration file if originally stored outside of the default `custom/` directory +- `custom` - All config or customization files in `custom/`. +- `data` - Data directory in <GITEA_WORK_DIR>, except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, sqlite file if you are using sqlite. +- `gitea-db.sql` - SQL dump of database +- `gitea-repo.zip` - Complete copy of the repository directory. +- `log/` - Various logs. They are not needed for a recovery or migration. Intermediate backup files are created in a temporary directory specified either with the `--tempdir` command-line parameter or the `TMPDIR` environment variable. @@ -56,7 +60,7 @@ Example: docker exec -u <OS_USERNAME> -it -w <--tempdir> $(docker ps -qf "name=<NAME_OF_DOCKER_CONTAINER>") bash -c '/app/gitea/gitea dump -c </path/to/app.ini>' ``` -*Note: `--tempdir` refers to the temporary directory of the docker environment used by Gitea; if you have not specified a custom `--tempdir`, then Gitea uses `/tmp` or the `TMPDIR` environment variable of the docker container. For `--tempdir` adjust your `docker exec` command options accordingly. +\*Note: `--tempdir` refers to the temporary directory of the docker environment used by Gitea; if you have not specified a custom `--tempdir`, then Gitea uses `/tmp` or the `TMPDIR` environment variable of the docker container. For `--tempdir` adjust your `docker exec` command options accordingly. The result should be a file, stored in the `--tempdir` specified, along the lines of: `gitea-dump-1482906742.zip` @@ -67,7 +71,7 @@ involves moving files to their correct locations and restoring a database dump. Example: -```none +```sh apt-get install gitea unzip gitea-dump-1482906742.zip cd gitea-dump-1482906742 |