897 B
897 B
Backup
Backing up the BASE_DIR (default: /srv) should in theory be sufficient.
Database Backup
As database servers like PostgreSQL might not play nicely with taking a backup of their data folders while running, it's advised to first dump the database and only include the dump in the backup.
Therefore, all database containers SHOULD follow a common naming folder scheme.
postgres
Scheme: $BASE_DIR/{service}/psql
Task: task srv:psql-dump -- {service}
Dump: /tmp/container-server/{service}.sql
{to be extended}
Scheme: $BASE_DIR/{service}/tbd
Task: task srv:tbd-dump -- {service}
Dump: /tmp/container-server/{service}.tbd
Borgmatic
Create a repo on your backup server, e.g. https://www.borgbase.com
Install
apk add borgmatic
Config
ln -vs /opt/container-server/backup/config.yaml /etc/borgmatic/config.yaml