docs: obs-portal: add prosaic sugar
All checks were successful
Flake checks / Check (pull_request) Successful in 6m12s

This commit is contained in:
Hendrik Sokolowski 2024-04-28 02:01:34 +02:00
parent 75c7e2dcf5
commit a278c178b0
Signed by: hensoko
GPG key ID: 5C36A01B80BCCC59

View file

@ -8,18 +8,25 @@
## Run database migrations ## Run database migrations
After an upgrade it is sometimes necessary to run database migrations or regenerate tiles.
``` ```
docker exec -ti obs-portal tools/upgrade.py docker exec -ti obs-portal tools/upgrade.py
``` ```
## Dump database ## Dump database
Save database dump to `dump.sql` in the current working directory.
``` ```
docker exec -ti --user postgres obs-portal-db pg_dump obs docker exec -ti --user postgres obs-portal-db pg_dump obs > dump.sql
``` ```
## Restore database ## Restore database
Load database dump from `dump.sql` file.
`obs` database needs to exist before importing the dump.
``` ```
cat dump.sql | docker exec -ti --user postgres obs-portal-db psql obs cat dump.sql | docker exec -ti --user postgres obs-portal-db psql obs
``` ```