0

I'm looking for a way to backup up VM's in my Xenserver 6.5 environment. I'm open to scripts or installing some tools/clients but it need to opensource. We want to backup to our Dell MD3660i SAN as well since we have a 20TB disk group dedicated as a storage repository, so NFS is NOT an option. This would be ideal:

  • either a script or tool/client setup
  • open source
  • backup to SAN SR - NO NFS!
  • retain a certain amount of backups/snapshots/templates. Delete the oldest once the limit is hit.
  • only backup the VM's on a host or the VM's specified - (I don't want to backup all running VM's because that'll take too long and weigh down the network). Backups will be carried out nightly, throughout the week and weekend.

    Any suggestions are appreciated.

jrd1989
  • 628
  • 10
  • 35

1 Answers1

0

It looks like you're searching for "snapback": https://github.com/markround/XenServer-snapshot-backup . It's a shell script launched by cron on the cluster pool-master and, based on "custom fields" defined on VMs, decide what to backup (xva_backup defined), when to backup (xva_backup=daily|weekly) and how many backup to keep alive (xva_retain). Backups, as you guess, are "snapshots" of VMs. The script is open-source and is easily adaptable to your specific needs.

As a side note, I'd suggest you to investigate other "classic" backup solution, like "Bacula", that are more "efficient" than a snapshot-based approach (being a backup solution, and not a disaster-recovery one) and that can surely backup "on-disk", without forcing the usage of LTOs tape/drive/library (that are supported, obviously).

PS: sorry to not provide urls/formatting: I'm typing from my 5" smartphone.

Damiano Verzulli
  • 3,948
  • 1
  • 20
  • 30
  • I came across this script and tested it out. I like it a lot but is it possible to specify multiple days (Mon, Wed, Fri)? The script has Sunday by default but is it possible to list multiple days? 2 more questions - will the script kick itself off if I specify weekly, daily or is cron needed? Finally, can you specify which VMs to backup or will it only backup all of them? I've got 70 in my environment and backing up all would take a long time. Thanks for responding! – jrd1989 Aug 21 '15 at 17:46
  • 1) "_is it possible to specify multiple days (Mon, Wed, Fri)?_": there's not a specific option. Nevertheless, if the needed schedule is shared among *ALL* the VMs to backup, you can easily set for a "daily" backup and then setup a proper CRON job (so the backup will be launched based on CRON) ; 2) "_is cron needed?_": yes. Definitely. ; 3) "_can you specify which VMs to backup or will it only backup all of them_": yes. Actually *NO* VMs will be backupped by default. If you want a VM to be backupped, you need to define the XVA_backup|XVA_retain custom field for such a VM – Damiano Verzulli Aug 21 '15 at 19:15
  • For some reason the script won't back up to my san SR, it is LVM over ISCSI. I don't understand how I can host VM's on one of the LUNs from our san (also LVM over ISCSI) but I can't backup to it. – jrd1989 Sep 03 '15 at 17:41