mirror of
https://github.com/tborychowski/self-hosted-cookbook.git
synced 2025-12-20 02:51:14 +00:00
added traccar GPS tracker to apps/other and backup guide for apps/photo/libre-photos (#12)
* Create traccar.md * Update traccar.md Added traccar GPS tracker to apps/other * Update traccar.md * included teaccar in readme * fixing format errors root mysql shell * added backup/restore to apps/photos/libre-photos Added backup and restore guide * fix typo
This commit is contained in:
@@ -143,3 +143,30 @@ services:
|
||||
container_name: librephotos-redis
|
||||
restart: unless-stopped
|
||||
```
|
||||
## Librephotos backup/restore
|
||||
|
||||
Docker offers volumes so /data and /code/protected_media are safely mounted on host. Simply rsync backup of these dirs
|
||||
|
||||
posstgres db backup
|
||||
|
||||
Usefull to avoid a full scan
|
||||
|
||||
`docker ps`
|
||||
|
||||
Grab postgres container id e.g.40b12de38945
|
||||
|
||||
Backup
|
||||
|
||||
`docker exec -t your-db-container pg_dumpall -c -U your-db-user > dump_$(date +%Y-%m-%d_%H_%M_%S).sql`
|
||||
|
||||
A file like dump_20-11-2022_00_55_26.sql is created
|
||||
|
||||
Restore
|
||||
|
||||
`cat your_dump.sql | docker exec -i your-db-container psql -U your-db-user -d your-db-name`
|
||||
|
||||
*Note the -U dbuser (default is docker for librephotos)
|
||||
and the -d bdname (default librephotos for librephotos)
|
||||
|
||||
Put that on a crontab
|
||||
And there you go you have periodic db snapshots
|
||||
|
||||
Reference in New Issue
Block a user