Filippo Zanardo's Blog

to blog or not to blog

Posts Tagged ‘xenserver 5.6 backup

Xenserver Backup Updated 2.2

with 31 comments


Ok guys,
i have some time and i have updated my xen backup script, to improve it and to add some few features.
Basically i add the possibility to compress the backup and the possibility to have more than 1 removable storage, the line changed in the config.txt file are:

#the uudi of the removable storage, at the moment i don’t have an efficent script to localize since name can change
@removableuuid = (‘d7a8fb07-e7d1-9eb4-6d79-dca8680ace89′,’d7a8fb07-e7d1-9eb4-6d79-dca8680ace86’);

#compress option enable/disable compression
$compress = true;

#compress command
$compresscmd = “tar -czvf”;

#compress extension easiser for me to put correct extension
$compressext = “.tar.gz”;

Few other check and modification, the rest is the same.
You can downlaod the new script at:

http://xenbackup.googlecode.com/files/xenbackup2.2.zip

Please comment for feature, bug and so on.

Enjoy! Cheers!

Web Xen Server Backup

with 9 comments


Ok guys,
finally i have some time to write what i have in mind, i’m starting a new project about xenserver backup.
The goal is to make a web interface for the backup and eventually for the restore of the vm.
Some feature i want to add:

  • Multiuser
  • ACL based
  • XMLRPC based
  • Scheduled backup
  • Extended notification
  • Multilanguage
  • Metadata backup
  • Data deduplication with lessfs or opendedup
  • Possibility to manage and take backup on every kind of storage (NAS,USB disk etc etc)
  • XVA can be downloaded everywhere
  • Cool interface
  • the interface can be installed everywhere as long the machine can communicate with xenserver

Ok this some of the feature i have in mind, more will come surely.
I will develop the project in PHP+Mysql+Js.

What do you think about?
What feature you want to be added?

Please comment so we can make some brainstorming and you can give me great idea, and of course if someone wanna help me or partecipate in this project it’s appreciated.

Cheers

Written by pipposan

December 28, 2010 at 12:02

XenServer Final Backup Script with or without snapshot

with 62 comments


Ok guys,
Xenserver 5.6 is out now, and i enhance my backup script i rewrite some part and add some more features/controls, that i will explain later.

UPDATED: 2.2 is now avaiable i rewrite the check avaiable space to fix a minor bug

You can donwload the 2.1 script here

http://xenbackup.googlecode.com/files/xenbackup2.1.zip

It’s simple to set up just modify config.txt and than you can run the script with this simple command line:

perl /path/to/backup.pl /path/to/config.txt

Now i will explain what you can configure and the features:

@skip: this variable contain the uuid of the machine to skip in the backup you can get with the command ‘xe vm-list’, add more uuid separeted by ‘,’

usesnapshot: if set to true backup script try to make a snapshot of the vm, else he shutdown the machine, export and power on the machine

removable: if set to true the script detach the removable storage, else snapshot fail, and then reattached in the correct order, just remember to set up the variable removableuuid with your removable uuid you can get with command ‘xe sr-list’

mailNotification: if set to true script send email to and from the email specified in the config file, i remove the script used before now script use ssmtp that is already installed in xenserver, just configure the file /etc/ssmtp/ssmtp.conf with your data and remember to uncomment this line FromLineOverride=YES

subfolder: Set to true to create a subfolder in the store for each backup based on vm name

versioning: Set to true to let the script manage to delete the backup older than a certain day or number or hours specified in the $delnumber variable

logging: if set to true the script write all the message with data into one log/file specified in the variable $logfile

automount: if set to true script try to mount the backupdir specified in mountcommand at start and umount at end, else no action taken and u have to mount dir manually

checkspace: if set to true the script check the avaiable space on the backup dir and if less than $spacerequired quit with a message, size is in MB

i add also some check to verify that the correct file is been written on the backup folder, if not backup error is notified.

That’s all i hope i explain well and you like the script, comment or post for bugs, feature etc etc.

Cheers!