From 66089e31081dfe36dad7df3d884717859edae43b Mon Sep 17 00:00:00 2001 From: Cyril Rohr Date: Tue, 4 Feb 2020 13:07:40 +0000 Subject: [PATCH] update backup and restore --- .../operation/backing-up/README.md | 11 +++-------- .../operation/restoring/README.md | 14 +------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/help/installation-and-operations/operation/backing-up/README.md b/help/installation-and-operations/operation/backing-up/README.md index 2d977ae867..0efd5afc0e 100644 --- a/help/installation-and-operations/operation/backing-up/README.md +++ b/help/installation-and-operations/operation/backing-up/README.md @@ -52,12 +52,9 @@ You should then copy those dump files to a secure location, for instance an S3 b ## Docker-based installation -TODO: review +If you are using docker-compose, then the data volumes are managed by Docker and you should have a look at https://docs.docker.com/storage/volumes/ for instructions on how to backup. -If you've followed the steps described in the [installation guide for Docker](../../installation/docker), -then you just need to make a backup of the exported volumes, at your -convenience. As a reminder, here is the recommended way to launch OpenProject -with Docker: +If you are using the all-in-one container, then you can simply backup any local volumes that you chose to bind-mount with the `-v` option when launching the container. For instance if you launched the container with: ```bash sudo mkdir -p /var/lib/openproject/{pgdata,logs,static} @@ -69,6 +66,4 @@ docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \ openproject/community:10 ``` -If you're using the same local directories than the above command, then you -just need to backup your local `/var/lib/openproject` folder (for instance to -S3 or FTP). +Then you would need to backup the `/var/lib/openproject` folder (for instance to S3 or FTP server). diff --git a/help/installation-and-operations/operation/restoring/README.md b/help/installation-and-operations/operation/restoring/README.md index d12ea23baa..b47c2c5089 100644 --- a/help/installation-and-operations/operation/restoring/README.md +++ b/help/installation-and-operations/operation/restoring/README.md @@ -97,16 +97,4 @@ sudo service openproject restart ## Docker-based installation -Assuming you have a backup as per the procedure described in the [Backing up](../backing-up) guide, if at any point you want to restore from a backup, just put your backup back in `/var/lib/openproject` on your local host, and re-launch the docker container with the recommended options. - -For instance, assuming your backup was stored on S3: - -```bash -aws s3 cp --recursive s3://my-backup-bucket/openproject-backups/ /var/lib/openproject/ - -docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \ - -v /var/lib/openproject/pgdata:/var/lib/postgresql/9.6/main \ - -v /var/lib/openproject/logs:/var/log/supervisor \ - -v /var/lib/openproject/static:/var/db/openproject \ - openproject/community:10 -``` +For Docker-based installations, assuming you have a backup as per the procedure described in the [Backing up](../backing-up) guide, you simply need to restore files into the correct folders (when using the all-in-one container), or restore the docker volumes (when using the Compose file), then start OpenProject using the normal docker or docker-compose command.