update backup and restore

pull/7946/head
Cyril Rohr 5 years ago
parent 23df7c756e
commit 66089e3108
  1. 11
      help/installation-and-operations/operation/backing-up/README.md
  2. 14
      help/installation-and-operations/operation/restoring/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 ## 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), 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:
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:
```bash ```bash
sudo mkdir -p /var/lib/openproject/{pgdata,logs,static} 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 openproject/community:10
``` ```
If you're using the same local directories than the above command, then you Then you would need to backup the `/var/lib/openproject` folder (for instance to S3 or FTP server).
just need to backup your local `/var/lib/openproject` folder (for instance to
S3 or FTP).

@ -97,16 +97,4 @@ sudo service openproject restart
## Docker-based installation ## 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 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.
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
```

Loading…
Cancel
Save