This is a post in the unraid series
Creating Backups ¶
There’s a lovely Unraid application called “CA Backup / Restore Appdata” which will allow one to automate the backing up of:
- our Unraid USB stick: Where the Unraid OS is stored, as well as some operating system settings
libvirt.img: Where information about our VMs is stored
- Appdata: Where a lot of our Docker containers save their images and settings
I leverage this tool to setup weekly backups of the folders described above, but we’re not done yet, as this stores the backups on the Unraid array itself. Generally data is not considered “backed up” until one follows the 3-2-1 rule.
3-2-1 Rule ¶
This rule states that “data is not backed up until its stored in three places, two different physical locations, one of which is off site”. Our usage of “CA Backup / Restore Appdata” makes it easy to create out backups but now we have to store them in two additional places, one of which should be off site.
Copying Backups ¶
To satisfy the 3-2-1 rule, I have a small script that will copy the backups from our Array to Unassigned Drive I have attached to my Unraid machine as well as send the data remotely to an offsite Raspberry Pi I have.
For those interested in these small scripts:
backup_unraid_backup_share.shkicks off the two scripts sequentially below
backup_unraid_tower_to_unassigned_drive.pycopies our backup to our local hard drive attached to our Unraid machine
backup_unraid_tower_to_fob.pycopies our backup to our remote machine
Moving Forward ¶
One additional step I could take is store our backups on some service that provides cloud storage. Something like S3 would work fine, but I’m particularly interested in the company Backblaze. They specialize in data hosting and produce these wonderful blog posts on the stats of hard drives. So what I would do is write an additional python script and add it to the
backup_unraid_backup_share.sh described above, which would copy our backup to Backblaze as well.
Backups are really important. Not described here is how we would perform a restore with a given backup.
If you are not performing backups, I highly recommend spending the time now to set it up. The hours you spend configuring your host OS, the numerous containers etc is not worth gambling with.
This is a post in the unraid series.
Other posts in this series:
- May 02, 2021 - How I Backup My Home Server
- Feb 03, 2020 - What I Use My Home Server For