aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlexandros Nicolaides <10987574+anicolaides@users.noreply.github.com>2019-04-08 15:45:29 +0300
committerLauris BH <lauris@nix.lv>2019-04-08 15:45:29 +0300
commit61b85990a62419aed0d425643cf723866e6de760 (patch)
tree436d5e81a19c5636f28db61f4c7e71e9691c74c0 /docs
parente7d7dcb0901b32bed90061e7bc8ae1d2e3c75654 (diff)
downloadgitea-61b85990a62419aed0d425643cf723866e6de760.tar.gz
gitea-61b85990a62419aed0d425643cf723866e6de760.zip
Added docker example for backup (#5846)
* Added docker example for backup * Fix using docker command example * Clarify --tempdir as per @lafriks suggestion
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/usage/backup-and-restore.en-us.md13
1 files changed, 13 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 9c24cb3d2f..0552d2b212 100644
--- a/docs/content/doc/usage/backup-and-restore.en-us.md
+++ b/docs/content/doc/usage/backup-and-restore.en-us.md
@@ -44,6 +44,19 @@ Inside the `gitea-dump-1482906742.zip` file, will be the following:
Intermediate backup files are created in a temporary directory specified either with the
`--tempdir` command-line parameter or the `TMPDIR` environment variable.
+### Using Docker (`dump`)
+There are a few caveats for using the `dump` command with Docker.
+
+The command has to be executed with the `RUN_USER = <OS_USERNAME>` specified in `gitea/conf/app.ini`; and, for the zipping of the backup folder to occur without permission error the command `docker exec` must be executed inside of the `--tempdir`.
+
+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 enviroment used by gitea; if you have not specified a custom `--tempdir`, then gitea uses `/tmp` or the `TMPDIR` enviromental 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`
+
## Restore Command (`restore`)
There is currently no support for a recovery command. It is a manual process that mostly