Since I have several Raspberry Pi’s running in at home, I needed a way to backup them up. Because, as we all know, everything fails at some point. In this post, I described the overall network architecture.
I chose raspiBackup since I don’t have to stop them and can automate the process. The goal was to back the Raspberry Pi’s to my NAS. I created an extra folder to store all backup images.
Take the following steps to reproduce the backup flow. First, you need to enable NTFS to be able to mount the folder on the Synology NAS. Click on “Control Panel > Shared Folder” and choose your destination folder. Then “Edit > NFS permissions”. Add the IP Address(es) of your Pi(s) with read /write access. Now the Synology NAS is ready.
On each Pi, you need to take the following steps. First, create a folder on the Pi which stores the backup and will be mounted.
sudo mkdir /mnt/backup
Next, you can mount the folder to the one on the NAS. Replace the IP address with the one from your Synology NAS and raspiBackup with your folder name. By this time, you should assign a permanent IP address to your NAS.
sudo mount 192.168.xx.xx:/volume1/raspiBackup /mnt/backup
Now it’s time to install raspiBackup on your Pi. I configured it to back up the whole system once a week when everybody is (or at least should be) sleeping. The documentation provides a good overview. Make sure to choose the created folder /mnt/backup during the setup. Here is the install script:
curl -L https://raspibackup.linux-tips-and-tricks.de/install | sudo bash
After configuring raspiBackup you can run it the first time.
sudo raspiBackup -m detailed
For me, this works great, and for testing purposes, I restored a Pi from a backup ed image which worked fine. There is not much more to say except that I can sleep now better, knowing my systems are being backed up. And yes, once a month I back up my Synology NAS too.