Merge branch 'current-docs'

This commit is contained in:
eikek
2021-12-18 12:53:02 +01:00
2 changed files with 45 additions and 1 deletions

View File

@ -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 distinguish between possibly multiple providers. The `client-id` and
`client-secret` define the two parameters required for a "confidential `client-secret` define the two parameters required for a "confidential
client". The different URLs are best explained at the [keycloak 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 They are available for all OPs in some way. The `user-url` is not
required, if the access token is already containing the necessary required, if the access token is already containing the necessary
data. If not, then docspell performs another request to the data. If not, then docspell performs another request to the

View File

@ -266,3 +266,47 @@ $ docker-compose down
$ docker-compose pull $ docker-compose pull
$ docker-compose up --force-recreate --build -d $ 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.