Introduction This is an instructional guide on how to backup your VMs to a dedicated CIFS server. There are a few key items here to ...
Introduction
This is an instructional guide on how to backup your VMs to a dedicated CIFS server.
There are a few key items here to keep track of, specifically UUID's. Because of the way How-To's are written on Spiceworks I can't enbolden or Italics certain text.
Keep a keen eye out for UUID and Snapshot-UUID, this is the Source and Target of your VM Backup. Do not get these mixed up!
And be very very certain when you're on the second to last step, Freeing up storage space ensuring your removing the correct UUID.
Steps (9 total)
For this instructional I've setup a simple Turnkey Linux File Server.
Download and install it to a USB using UNetBootin.
Setup your hardware to boot off of USB, and then install the Turnkey Linux.
Ensure you grab the security updates while you're at it.
Set up your file server however you'd like, I just did a very basic setup (as simple as Turnkey Linux makes it)
Enter an administrative password.
Statically assign the IP on the server so you don't have to worry about it being handed out to someone else. While your at this, you might as well add a DHCP reservation.
Back on your Xen Server (either through the console or SSH) run the following commands.
mount -t cifs //192.168.X.X/storage/your-backup-folder /mnt/your-backup-folder/ -o username=USERNAME,password=PASSWORD
The username and password are what you setup on the Turnkey Linux Server (not on your Xen Server).
Run the below code, again this backup process only works on RUNNING VM's so make sure that they're started!
xe vm-list is-control-domain=false is-a-snapshot=false
Once the list is generated, scroll until you find the UUID of the VM that you want to make a backup of, and copy it into system memory. (I would not even considering trying to write this down)
The below will make a live snapshot of the specified UUID and name it whatever you want it named.
xe vm-snapshot uuid=UUID of VM to backup new-name-label=Snapshot-Meaningful-Name
Once this step completed you'll be presented with the SNAPSHOT-UUID.
Running the below code will convert the Snapshot.
xe template-param-set is-a-template=false ha-always-run=false uuid=Snapshot-UUID
The below will then export the Template-UUID to your CIFS file server.
This is by far the longest WAIT-Time process as the xva is being stored on your CIFS server.
xe vm-export vm=Snapshot-UUID filename=/mnt/your-backup-folder/backup-name.xva
This last step will remove the snapshot from your Xen Server, meaning, you aren't wasting space to store a backup XVA locally.
xe vm-uninstall uuid=Snapshot-UUID force=true
Conclusion
Once you've tested your VM Backup, you should be good to go to backup your VM's as needed.
Granted its a bit of a manual process but its better than nothing, and if you want a great VM platform and simple backup system in place. I can't think of a better way to go.
No comments
Post a Comment