diff options
author | Marco Blessing <marco.blessing@googlemail.com> | 2022-03-02 17:20:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 11:20:00 -0500 |
commit | df9802ca61bac32e9f636e6d813a7fc6608b26a3 (patch) | |
tree | 5e37f4c5d05f458c1849b322d6fa2ed20205147e /docs | |
parent | dd712b77f7ccc0e3c3f1872c96dc120c20af0b08 (diff) | |
download | gitea-df9802ca61bac32e9f636e6d813a7fc6608b26a3.tar.gz gitea-df9802ca61bac32e9f636e6d813a7fc6608b26a3.zip |
adds restore docs for docker based instances (#18844)
* adds docke restore section
* fix typo
* Update docs/content/doc/usage/backup-and-restore.en-us.md
Co-authored-by: Gusted <williamzijl7@hotmail.com>
* fix container id placeholder
* adds restore help for docker-rootless
* restore yml autoformater quotes
Co-authored-by: Marco Blessing <marco.blessing@komm.one>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/doc/usage/backup-and-restore.en-us.md | 56 |
1 files changed, 56 insertions, 0 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 fcb669b836..8d90379abe 100644 --- a/docs/content/doc/usage/backup-and-restore.en-us.md +++ b/docs/content/doc/usage/backup-and-restore.en-us.md @@ -95,3 +95,59 @@ Repository Git Hooks should be regenerated if installation method is changed (eg With Gitea running, and from the directory Gitea's binary is located, execute: `./gitea admin regenerate hooks` This ensures that application and configuration file paths in repository Git Hooks are consistent and applicable to the current installation. If these paths are not updated, repository `push` actions will fail. + +### Using Docker (`restore`) + +There is also no support for a recovery command in a Docker-based gitea instance. The restore process contains the same steps as described in the previous section but with different paths. + +Example: + +```sh +# open bash session in container +docker exec --user git -it 2a83b293548e bash +# unzip your backup file within the container +unzip gitea-dump-1610949662.zip +cd gitea-dump-1610949662 +# restore the gitea data +mv data/* /data/gitea +# restore the repositories itself +mv repos/* /data/git/repositories/ +# adjust file permissions +chown -R git:git /data +# Regenerate Git Hooks +/usr/local/bin/gitea -c '/data/gitea/conf/app.ini' admin regenerate hooks +``` + +The default user in the gitea container is `git` (1000:1000). Please replace `2a83b293548e` with your gitea container id or name. + +These are the default paths used in the container: + +```text +DEFAULT CONFIGURATION: + CustomPath: /data/gitea (GITEA_CUSTOM) + CustomConf: /data/gitea/conf/app.ini + AppPath: /usr/local/bin/gitea + AppWorkPath: /usr/local/bin +``` + +### Using Docker-rootless (`restore`) + +The restore workflow in Docker-rootless containers differs only in the directories to be used: + +```sh +# open bash session in container +docker exec --user git -it 2a83b293548e bash +# unzip your backup file within the container +unzip gitea-dump-1610949662.zip +cd gitea-dump-1610949662 +# restore the app.ini +mv data/conf/app.ini /etc/gitea/app.ini +# restore the gitea data +mv data/* /var/lib/gitea +# restore the repositories itself +mv repos/* /var/lib/gitea/git/repositories +# adjust file permissions +chown -R git:git /etc/gitea/app.ini /var/lib/gitea +# Regenerate Git Hooks +/usr/local/bin/gitea -c '/etc/gitea/app.ini' admin regenerate hooks +``` |