I’ve recently setup a full system backup for my raspberry pi home server, backing up to my NAS over NFS. Working backups give me the confidence to use it for more critical things like email, calendar and contacts.
I’ve used restic as it does convenient, password-encrypted, differential backups to a variety of backends.
I’ve set it up with a systemd timer to trigger it. The script I’ve written shuts down all services so the file system isn’t changing too much underneath while the backup is working, mounts the backup location, does the backup, then unmounts the backup again before restarting the rest of the system. I think it’s important to disconnect the backup location during normal operation to prevent damage to backups should some bad command run, like
rm -rf /.
I’ve tested restoring the whole system to a new SD card, and while it’s not perfect, it does work with only minor adjustments after restore.
In future I’ll probably copy the backup to an offsite system like backblaze B2, or I’ll set up an arrangement with a friend who also has some space on a NAS and a decent ’net connection. I’ll also configure restic to prune old backups to save on space.