Hi everyone,
I’m hoping to get some advice from the community on a more space-efficient backup strategy. I have multiple Raspberry Pis running DietPi, and I’m running into a critical problem: I’m running out of disk space for backups.
I really need to back them up regularly, but the standard dietpi-backup creates a full, uncompressed copy each time. With large USB sticks, this is consuming hundreds of gigabytes on my NAS, and it’s just not sustainable anymore.
My plan is to switch to my Synology’s Active Backup for Business (File Server mode). I already use this for my Ubuntu servers and it works perfectly—it uses rsync but adds excellent server-side deduplication and compression, which solves the space problem. For Ubuntu, I just add the Synology’s SSH public key to the server’s /root/.ssh/authorized_keys file, and Active Backup can connect and pull the data. I’m hoping to replicate this exact process for my DietPi systems.
My main concern isn’t making the backup, but rather how to restore it safely and correctly if I ever need to. I want to make sure I have a solid plan before I rely on this method.
From reading online, I’ve put together a potential restore plan. Could you please tell me if this is the correct and safe way to do a manual rsync restore onto a DietPi system?
Here is my proposed restore process:
Start with a brand new, clean installation of DietPi on my USB drive.
Once it’s running and I can SSH in, I would stop all running software services to prevent file corruption during the restore, using the command:
sudo dietpi-services stop
Then, I would run an rsync command from the DietPi to “pull” the backup data from the Synology back to the Pi’s root filesystem.
My Questions for the Community:
Is the 3-step process above correct? Is stopping the services with dietpi-services stop the right first step before running rsync?
What would the correct rsync restore command be? I’m guessing it would be something like this, but I’m not sure if these are the best flags to use.
sudo rsync -aHvh --delete USER@SYNOLOGY_IP:/path/to/backup/folder/ /
What directories should I exclude? To make sure this restore process works, I assume I need to exclude certain system directories from the backup job in Synology’s Active Backup. I was planning to exclude the following. Is this list correct, or am I missing anything important?
/boot
/dev
/proc
/sys
/run
/tmp
/mnt
/media
/lost+found
/var/log
/var/cache
I’m really just trying to make sure I don’t miss a critical step and end up with a broken system after a restore. Any guidance or corrections to my plan would be hugely appreciated.
Thanks in advance for your help!