quibbly
asked on
Xen 5.5 scheduled offline backup (not snapshot)
I have a few Xen 5.5 servers in production and presently I'm not happy with the snapshot feature to a NAS device. Seems there are a few issues with recovery of snapshots.
What I'm looking for is an automated script that will take the virtual servers offline (shutdown), export to a mounted NAS (I do this already with our NAS). Once the export is done, start the virtual servers backup.
What I have found with testing is that the export of the virtual server is the only real way to recover a virtual server to another Xen server without any issues.
What I'm looking for is an automated script that will take the virtual servers offline (shutdown), export to a mounted NAS (I do this already with our NAS). Once the export is done, start the virtual servers backup.
What I have found with testing is that the export of the virtual server is the only real way to recover a virtual server to another Xen server without any issues.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mkdir /home/backup
mkdir /backup
vi /home/backup/vm_backup.sh
mount //192.168.10.25/Backups -o password= /backup
xe vm-shutdown uuid=408b46f8-80b3-876e-45
xe vm-shutdown uuid=c1b49ae2-130c-2e7b-ca
xe vm-export uuid=408b46f8-80b3-876e-45
xe vm-export uuid=c1b49ae2-130c-2e7b-ca
xe vm-start uuid=c1b49ae2-130c-2e7b-ca
xe vm-start uuid=408b46f8-80b3-876e-45
umount /backup
I then created a cronjob
crontab -e
0 2 * * * /home/backup/vm_backup.sh >> /home/backup/vm_backup.log