Skip to content

How to Backup Xen Orchestra


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.


As of 3/27/20, Xen Orchestra is now running on a Raspberry Pi 4 with a static IP of

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

Mount NAS to RasPi

In order to backup to the NAS, the following was done:

  • Change directory to /mnt
  • Make a backups directory
sudo mkdir backups
  • Create an entry in the fstab folder
# Diskstation    /mnt/backups    nfs     defaults        0       0
  • Confirm there are no errors
sudo mount -a

Configure Backup

  • Clone the backup script
cd ~
git clone
  • Change into the Git directory
  • Make an initial backup using the following command:
sudo sh start -c /mnt/backups/rpi_backup.img

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 if the job fails for any reason after a 60 minute grace period.

Open crontab with the following command:

sudo crontab -e

In the crontab editor, add the following syntax:

0 0 * * * sudo sh /home/xenadmin/bkup_rpimage/ start -c /mnt/backups/rpi_backup.img && curl -fsS --retry 3 > /dev/null