How to Backup Xen Orchestra⚓
Attention
As of 8/22/21, I'm no longer using XCP-NG. This information is being left as reference material, but should be considered outdated and/or inaccurate.
Summary⚓
As of 3/27/20, Xen Orchestra is now running on a Raspberry Pi 4 with a static IP of 192.168.1.60.
This article details the steps taken to setup an incremental backup of Xen Orchestra to the Synology NAS. A cron job has also been configured with notifications setup with healthchecks.io.
Mount NAS to RasPi⚓
In order to backup to the NAS, the following was done:
- Change directory to
/mnt - Make a backups directory
- Create an entry in the
fstabfolder
- Confirm there are no errors
Configure Backup⚓
- Clone the backup script
- Change into the Git directory
- Make an initial backup using the following command:
The initial image took ~15 mins, but was successful.
Setup Automatic Backups⚓
In order to setup automatic backups, a cron job can be leveraged to make this happen. For this, the crontab editor will be used and will accomplish the following:
- Incremental Backup
- Runs daily at midnight
- Sends an alert to healthchecks.io if the job fails for any reason after a 60 minute grace period.
Open crontab with the following command:
In the crontab editor, add the following syntax:
0 0 * * * sudo sh /home/xenadmin/bkup_rpimage/bkup_rpimage.sh start -c /mnt/backups/rpi_backup.img && curl -fsS --retry 3 https://hc-ping.com/36d4e296-dbcb-4a11-8c89-0cbebb2f3876 > /dev/null