4 ms·
Anyone has advice for backup up a postgres database that is run for personal use? I currently have one that is used by miniflux. I wrote a script for backing it
by ksynwa 2y ago
Anyone has advice for backup up a postgres database that is run for personal use? I currently have one that is used by miniflux. I wrote a script for backing it up but it is gonna fail me some day.
```
#!/usr/bin/env sh
set -e
PGUSER=miniflux PGPASSWORD=... pg_dump -F t -h 127.0.0.1 miniflux | gzip > /backups/miniflux_db_temp.tar.gz
mv /backups/miniflux_db{_temp,}.tar.gz
```
- supriyo-biswas 2y agoThat works but for a more robust solution you could look at https://pgbackrest.org https://pgbackrest.org
- sureglymop 2y agoI do something similar but pipe a dump of the whole db with pg_dump into restic. Only works well for small to medium sized DBs.
- Jeffpk11 2y ago[dead]