diff --git a/website/site/content/docs/configure/_index.md b/website/site/content/docs/configure/_index.md index 83d27088..f83a1098 100644 --- a/website/site/content/docs/configure/_index.md +++ b/website/site/content/docs/configure/_index.md @@ -391,7 +391,7 @@ The `provider-id` is some identifier that is used in the URL to distinguish between possibly multiple providers. The `client-id` and `client-secret` define the two parameters required for a "confidential client". The different URLs are best explained at the [keycloak -docs](https://www.keycloak.org/docs/latest/server_admin/#_oidc-endpoints). +docs](https://www.keycloak.org/docs/latest/server_admin/). They are available for all OPs in some way. The `user-url` is not required, if the access token is already containing the necessary data. If not, then docspell performs another request to the diff --git a/website/site/content/docs/install/docker.md b/website/site/content/docs/install/docker.md index 5bc9c7b6..29b1da64 100644 --- a/website/site/content/docs/install/docker.md +++ b/website/site/content/docs/install/docker.md @@ -266,3 +266,47 @@ $ docker-compose down $ docker-compose pull $ docker-compose up --force-recreate --build -d ``` + +### Backups + +When running the docker compose setup, you can use the following to +backup the database. + +1. (Optionally) Stop docspell, for example with `docker-compose down`. + It is preferred to stop, i.e. should you upgrade versions. +2. Add a new file `docker-compose.override.yml` (next to your + `docker-compose.yml`) with this content: + + ```yml + version: '3.8' + services: + + db: + volumes: + - /some/backupdir:/opt/backup + ``` + + The `/some/backupdir` is the directory where the backup should be stored on the host. +3. If you stopped the containers in step 1, start now **only** the db service via `docker-compose up -d -- db` +4. Run the dump command: + ``` + docker exec -it postgres_db pg_dump -d dbname -U dbuser -Fc -f /opt/backup/docspell.sqlc + ``` + +The `docker-compose.override.yml` file is only to mount a local +directory into the db container. You can also add these lines directly +into the `docker-compose.yml`. Now you have the dump in your local +`/some/backupdir` directory. + +This dump can be restored almost the same way. Mount your backup +directory into the db container as before in steps 1-3. Then run this +command in step 4 instead: + +``` +docker exec -it postgres_db pg_restore -d dbname -U dbuser -Fc /opt/backup/docspell.sqlc +``` + +So, before the upgrade run steps 1 to 4. Then you have a dump of your +current database (everything, files and all other data). When creating +and restoring a dump, do not start the docspell containers - make sure +to start the db container only.