container-server/backup
2023-10-29 20:22:54 +01:00
..
config.template.yaml Setup games server with minecraft 2023-10-29 20:22:54 +01:00
prepare-backup.sh setup borg backup (#4) 2023-10-18 19:54:47 +02:00
readme.md setup borg backup (#4) 2023-10-18 19:54:47 +02:00

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