• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 808
  • Last Modified:

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?
0
compdigit44
Asked:
compdigit44
  • 4
  • 3
1 Solution
 
wesly_chenCommented:
> 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
0
 
wesly_chenCommented:
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.
0
 
compdigit44Author Commented:
which config files would this backup?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
wesly_chenCommented:
> which config files would this backup?
That should be your questions. What files do you want to backup and put into

CONFIG_FILES='list of /path-to-those configuration files'

I don't know where do you put those files.
0
 
compdigit44Author Commented:
Not sure I left everything as default when I installed XenServer
0
 
compdigit44Author Commented:
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
0
 
wesly_chenCommented:
> 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.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now