How I organize my server backups in 2024
Personnal process documentation
Overview and strategy
- Each service is set up to write daily automatic backups to a local target directory.
- On my home TrueNAS SCALE, a daily PULL-based Rsync job is set up to collect the content of each VM’s target backup directory.
- On a remote TrueNAS SCALE, a redundant but independent Rsync PULL job is also configured for each VM’s target backup directory.
Backup automation and dump directory
Some hosted services have application-managed backups. When that is the case, I don’t try to enforce a target directory. I customize the Rsync task with a modified target directory.
For custom builds which have stateful data which must be backed up,
a simple shell script executed on a Systemd timer that I wrote invokes tar
,
and in some cases mysql_dump
and pg_dump
.
Backup file archives and data dumps are organized in /var/local/backups
.
Notes
Additional explanation on some component of the diagram.
mail02
A Ditital Ocean VM running mailcow: dockerized.
There is a backup script included which puts backups in /opt/backup
.
https://docs.mailcow.email/backup_restore/b_n_r-backup/?h=backup
Unifi
Controller software for Ubiquiti Wi-Fi access point. Installed on an Ubuntu server VM on my home hypervisor.
Application-managed backups are dumped to /var/lib/unifi/backup
.
web-02
Custom Apache 2.4 on Ubuntu build for hosting Wordpress and static websites.