• View Communities
    • Citrix Developer Network
      The place for unfiltered straight talk on Citrix products. Blogs, code downloads, best practices, APIs, and more can all be found here.
    • Citrix Ready Community Verified
      Does it work with Citrix? Application compatibility questions are a thing of the past with the new Citrix Community Verified site.
    • Blogs
      Learn the latest from the Citrix employees who are building application delivery infrastructure technologies.
    • Blogosphere
      The Citrix Blogosphere is a window into the thousands of conversations taking place about Citrix and Application Delivery.
  •  Sign In
Application Delivery Infrastructure

Simple Automatic Backup Script

Here is a simple backup script that you can run to backup your configuration automatically. Applicable to XenServer 4.1.0. Thanks to Danny Wannagat for the script.

Nano backup.sh // Create a backup.sh file

Copy the following stuff:

 

# XenServer Backup Script

# V0.1  Danny Wannagat

 

backupdir=/root/xenbackup

mkdir $backupdir

 

xe vm-export filename=/$backupdir/vm-`date +%Y%m%d` --multiple metadata=true

xe pool-dump-database file-name=/$backupdir/pool-`date +%y%m%d`

 

find /root/xenbackup/ -mtime 7 -type f -exec rm {} \;  

 

Chmod 755 backup.sh   // change permissions of backup.sh script

 

Copy the script to the cron job directory

Cp ./backup.sh  /etc/cron.daily/
Enter tags to add to this page:
Please wait 
Looking for a tag? Just start typing.
Related Links