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.  
quibblyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ToxicPigCommented:
Referencing a previous answer of mine for the script:

http://www.experts-exchange.com/Software/Virtualization/Xen/Q_25205091.html

All you would need to do would be take the script, and put it into a cronjob that you dump into /etc/crontab at the appropriate time for you.  Note there are new and better ways of taking backups and doing DR using Citrix StorageLink.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
quibblyAuthor Commented:
for this to work, I set it up like this:

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-45a3-ce06a0f3c1d0
xe vm-shutdown uuid=c1b49ae2-130c-2e7b-cabf-c7636669cd18


xe vm-export uuid=408b46f8-80b3-876e-45a3-ce06a0f3c1d0 filename=/backup/svr-pm.xva
xe vm-export uuid=c1b49ae2-130c-2e7b-cabf-c7636669cd18 filename=/backup/svr-pdc.xva


xe vm-start uuid=c1b49ae2-130c-2e7b-cabf-c7636669cd18
xe vm-start uuid=408b46f8-80b3-876e-45a3-ce06a0f3c1d0

umount /backup


I then created a cronjob

crontab -e

0 2 * * * /home/backup/vm_backup.sh >> /home/backup/vm_backup.log 2>&1
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Virtualization

From novice to tech pro — start learning today.