Link to home
Start Free TrialLog in
Avatar of compdigit44
compdigit44

asked on

XenServer 5.6 FP1 Server backup Config script

I will be installing XenServer 5.6 Fp1 on a stand-alone server with local. How could I write a script to backup or dump all of the core config on the XenServer to a Windows Share once a week?
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

> Windows Share
1. you need to access linux share from stand-alone server (networked ?)
Here is the tutorial
http://www.cyberciti.biz/faq/access-windows-shares-from-linux/
---------
Say, your mount point is
/win-share/backup

2. a script to copy the configuration files to /win-share/backup
-------- /root/bin/xen-backup.sh --
#!/bin/sh

BACKUP_DIR=/win-share/backup
CONFIG_FILES='list of /path-to-those configuration files'

/bin/cp -pf $CONFIG_FILES  $BACKUP_DIR
---------

chmod +x /root/bin/xen-backup.sh

3. setup cron job to backup
crontab -e
------------
* * * * * 6 /root/bin/xen-backup.sh > /dev/null 2>&1
typo for crontab
--
crontab -e
------------
0 1 * * 6 /root/bin/xen-backup.sh > /dev/null 2>&1
------
The script will run every Saturday at 1:00AM.
Avatar of compdigit44
compdigit44

ASKER

which config files would this backup?
ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not sure I left everything as default when I installed XenServer
Question if I were to upgrade to XenServer ADVANCED and get another server for D/R could the VM be scheduled to move to another server nightly so they are always ready as a cold/warm standby
> could the VM be scheduled to move to another server nightly so they are always ready as a cold/warm standby

Please open another question for that. I don't have answer for it.
Make sure you add multiple related zones for your question so you can response quickly.