Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

moved mounting-after-the-fact instructions to docker upgrade section; added more backup instructions

Markus Kahl416cab399a7f
diff --git a/docs/installation-and-operations/installation/synology/README.md b/docs/installation-and-operations/installation/synology/README.md
index 053ac916946..11e75236ba9 100644
--- a/docs/installation-and-operations/installation/synology/README.md
+++ b/docs/installation-and-operations/installation/synology/README.md
@@ -52,27 +52,4 @@ Your OpenProject data will remain intact as long as you mounted the volumes as d
### I had already started OpenProject without mounted volumes. How do I save my data during an update?
You will need to open a terminal on your Synology disk station.
-Then you can extract your data from the existing container and mount it in a new one with the correct configuration.
-
-1. Stop the container to avoid changes to the data.
-2. Copy the data to a new directory on the host, e.g. `/volume1/openproject`.
-3. Launch the new container mounting the folders in that directory as described above.
-4. Delete the old container once you confirmed the new one is working correctly.
-
-You can copy the data from the container using `docker cp` like this:
-
-```
-# Find out the container name with `docker ps`, we use `openproject-community1` here.
-# The target folder should be what ever persistent volume you have on the system, e.g. `/volume1`.
-docker cp openproject-community1:/var/openproject/assets /volume1/openproject/assets
-docker cp openproject-community1:/var/openproject/pgdata /volume1/openproject/pgdata
-```
-
-Make sure the folders have the correct owner so the new container can read and write them.
-
-```
-sudo chown -R 102 /volume1/openproject/*
-```
-
-After this it's simply a matter of launching the new container mounted with the copied `pgdata` and `assets` folders
-as described earlier.
+Then follow the instructions given in the [upgrade section](../../installation/docker/#i-have-already-started-openproject-without-mounted-volumes-how-do-i-save-my-data-during-an-update)..
diff --git a/docs/installation-and-operations/operation/backing-up/README.md b/docs/installation-and-operations/operation/backing-up/README.md
index 8fafcc15754..000f77ba1f6 100644
--- a/docs/installation-and-operations/operation/backing-up/README.md
+++ b/docs/installation-and-operations/operation/backing-up/README.md
@@ -66,3 +66,41 @@ docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \
```
Then you would need to backup the `/var/lib/openproject` folder (for instance to S3 or FTP server).
+
+### Dumping the database
+
+When using docker-compose you can simply dump the database from the database container.
+
+```
+docker exec -it db_1 pg_dump -U postgres -d openproject -x -O > openproject.sql
+```
+
+This assumes that the database container is called `db_1`. Find out the actual name on your host using `docker ps | postgres`.
+
+#### All-in-one container
+
+If you need a regular dump of the database you can get one using `pg_dump` like this:
+
+```
+docker exec -e PGPASSWORD=openproject -it $OP_CONTAINER_NAME pg_dump -U openproject -h localhost -d openproject -x -O > openproject.sql
+```
+
+Where `$OP_CONTAINER_NAME` is the name of your OpenProject container. If you don't know it you can find it using `docker ps | grep openproject`.
+
+### Importing the dump into a new container
+
+If you are using docker-compose this is what you do after you started everything for the first time using `docker-compose up -d`:
+
+1. Stop the OpenProject container using `docker-compose stop web worker`.
+2. Drop the existing, seeded database using `docker exec -it db_1 psql -U postgres -c 'drop database openproject;`
+3. Recreate the database using `docker exec -it db_1 psql -U postgres -c 'create database openproject;`
+4. Copy the dump onto the container: `docker cp openproject.sql db_1:/`
+5. Source the dump with psql on the container: `docker exec -it db_1 psql -U postgres` followed by `\i openproject.sql`
+6. Delete the dump on the container: `docker exec -it db_1 rm openproject.sql`
+7. Restart the web and worker processes: `docker-compose start web worker`
+
+This assumes that the database container is called `db_1`. Find out the actual name on your host using `docker ps | postgres`.
+
+#### All-in-one container
+
+TBD
diff --git a/docs/installation-and-operations/operation/upgrading/README.md b/docs/installation-and-operations/operation/upgrading/README.md
index cce4eb1f09e..bafe99d6264 100644
--- a/docs/installation-and-operations/operation/upgrading/README.md
+++ b/docs/installation-and-operations/operation/upgrading/README.md
@@ -68,6 +68,7 @@ docker-compose up -d
Please note that you can override the `TAG` that is used to pull the OpenProject image from the [Docker Hub](https://hub.docker.com/r/openproject/community).
+### All-in-one container
When using the all-in-one docker container, you need to perform the following steps:
@@ -92,6 +93,33 @@ This time, it will use the new image:
docker run -d ... openproject/community:VERSION
```
+#### I have already started OpenProject without mounted volumes. How do I save my data during an update?
+
+You can extract your data from the existing container and mount it in a new one with the correct configuration.
+
+1. Stop the container to avoid changes to the data. Stopping the container does not delete any data as long as you don't remove the container.
+2. Copy the data to a new directory on the host, e.g. `/var/lib/openproject`, or a mounted network drive, say `/volume1`.
+3. Launch the new container mounting the folders in that directory as described above.
+4. Delete the old container once you confirmed the new one is working correctly.
+
+You can copy the data from the container using `docker cp` like this:
+
+```
+# Find out the container name with `docker ps`, we use `openproject-community1` here.
+# The target folder should be what ever persistent volume you have on the system, e.g. `/volume1`.
+docker cp openproject-community1:/var/openproject/assets /volume1/openproject/assets
+docker cp openproject-community1:/var/openproject/pgdata /volume1/openproject/pgdata
+```
+
+Make sure the folders have the correct owner so the new container can read and write them.
+
+```
+sudo chown -R 102 /volume1/openproject/*
+```
+
+After that it's simply a matter of launching the new container mounted with the copied `pgdata` and `assets` folders
+as described in the [installation section](../../installation/docker/#recommended-usage).
+
## Upgrade notes for 8.x to 9.x
These following points are some known issues regarding the update to 9.0.