VMware Cloud Community
admin
Immortal
Immortal

Announcement: New (free) backup utility realease.

Hello all,

I've written a backup utility, it's currently still in 'beta' but I think I've worked out most of the bugs and it's been working very well for me, so I thought I'd share my work with the community. Smiley Happy

I'll be trying to update it fairly regularly, hot-clone of a VM or specific VMDK attached to a VM planned for next version.

Please see the readme file here for some initial instructions: http://users.ox.ac.uk/~alexm/README

You can download the utility here:

http://xtravirt.com/index.php?option=com_remository&Itemid=75&func=select&id=5

Once you've extracted the archive, please read the README file in the directory created for instructions on using the utility.

Any problems post them to this thread and I'll try and resolve them, I'll set up a proper website when I have the time.

Alex

p.s. Big thanks to acr for help with testing!

Added link to the latest release - 21st May 2007[/b]

Message was edited by:

MR-T: Updated with link to Xtravirt site

0 Kudos
367 Replies
c0de1
Contributor
Contributor

Alex,

I did not tested TSM yet, if i do i will post it here.

I'm very happy with the option to exclude vm's from backup, it works like a charme

Keep up the good work !

0 Kudos
kpc
Contributor
Contributor

Hi

I want to send the email report to a 2nd email account, i've tried adding a second account in the configuration screen by using a comma and semi-colon but none seem to work, e.g

Please enter your recipient address: email1@domain.com,email2@domain.com

also

Please enter your recipient address: email1@domain.com;email2@domain.com

I've also thought about adding a sendmail alias but the file /etc/alias doesn't exist.

Anybody got any ideas?

Thanks

0 Kudos
kpc
Contributor
Contributor

sorry double post by accident...

0 Kudos
admin
Immortal
Immortal

Afraid currently you can only email reports to one address - what I suggest you do is set up a mail list or alias that forwards to your desired email addresses. I'll add multiple email recipients to the feature request list.

Alex

0 Kudos
c0de1
Contributor
Contributor

Alex,

Why is it that if i schedule a backup without the -dryrun option that i still see the following in the log file of a VM:

06/12/2007 18:00:10: Log file opened.

06/12/2007 18:00:10: NOTE: This is a dry run, VM will not be snapshotted or exported!

And i notice three strange error in one of the backup logs:

05/12/2007 18:00:21: Disk scsi0:1 for TSTGDC001 is set to be excluded from backup, junk vmx entry?

05/12/2007 18:00:21: Disk scsi0:4 for TSTAPP022 is set to be excluded from backup, junk vmx entry?

05/12/2007 18:00:22: Disk scsi0:2 for TSTAPP012B is set to be excluded from backup, junk vmx entry?

0 Kudos
axeboyokc
Contributor
Contributor

Great script Alex... One question for you though. Is it possible to do multiple virtual machine backups by name in a config file.The powerstate:on option won't work for me because i have some vm's that are to large to backup and some test and dev machines that don't need it.

Any help is appreciated.

0 Kudos
c0de1
Contributor
Contributor

Ik ben op vakantie van 21 dec tot 7 jan.

Voor dringende zaken gaarne de servicedesk bellen

Mvgr,

Andre Dijkgat

I'm away from 21 dec till 7 jan 2008

For urgent mathers please call servicedesk

Kind regards,

Andre Dijkgat

0 Kudos
dsanders
Expert
Expert

You may want to look at using the VMX file options. What I do is backup all machines that are powered on, but for the handful of machines that I want to exclude I disable them in the VMX file.

From the README:

"VMX Entry:

backup.Mode = "X"

Action:

X= Manual - Only back this VM when running a manual backup.

X= Disabled - Always exclude this VM from backup."

0 Kudos
drheim
Enthusiast
Enthusiast

First of all, good work Alex Mittell. Although the script do not do everything that the expensive 3rd party software does, for most VMs(non-database and non-file server VMs) it is lot quicker and easier than useing EsxRanger or something like that. I have a couple of questions or looking for suggestions.

1. someone may have already asked this, but I have a question about the snapshot option. When I add in the snaps=1 and run the backup it works fine with VMs that do have snapshots and also works fine with VMs that do not have snapshots. Why not always run with the snaps=1 option? Basically, I was going to create (2)cfg files pointing to (2)vml files and have 1 cfg file with the snapshotted VMs in there and the other cfg file without the snaps=1 option, but it look like I do not have to seperate them as long as I always leave the snaps=1 option in the cfg file. I am still testing this, but have not seen a problem yet.

2. I use this utility to backuo VMs off the SAN(fc) and onto local disk for Disaster Recovery in case of SAN failure. Everything works fine, but when I run a visbu backup from SAN to local disk it always puts the vmdk files into a sub folder with the Unique LUN number that matched the location on the SAN where they resided before the backup. When I run a restore it always seems to fix this problem and restore the files all into 1 directory at the path I specify during the restore. My question is this. Can I backup my VMs to local disk so that they are ready to be added to inventory without needing to run the restore? I moving the vmdk files manually and updating the vmx files as well, but I can not get the VMs to start up unless I run the restore. So right now I am backing up my VMs to /vmfs/volumes/localdisk/backups and if my SAN did crash I have to run a restore to /vmfs/volumes/localdisk/ to get it to work fine. The problem with this is that when you have a lot of VMs it is a lot slower than just being able to readd them to inventory manually.

By the way, for anyone else out there doing anything similar to this to local disk, you will notice that you will not be able to start up a VM that resides on a local disk and was registered through a VC server. You have to point your VI client to the server that has the local storage attached and register it through there first and then logout of your VI client and log it back in through your Virtual Center server and you will see that VM in there and be able to start it fine. This caused me problems for a long time.

Any suggestions or comments would be appreciated.

Thanks,

Dan

0 Kudos
Roman_Romano
Enthusiast
Enthusiast

Point 2.

I have had success by:

1) moving the vmx and vmxf files into the directory that holds the vmdk files (the one with the unique LUN number)

2) making the vmx file executable for the User (eg. chmod u+x VirtualMachine.vmx

3) adding this vmx file to the Inventory in VirtualCenter

hope that helps

0 Kudos
drheim
Enthusiast
Enthusiast

Hey Roman - Thanks a lot. For whetever reason I had been trying to move the disk files into the same directory as the vmx files and that never worked, but when I moved the vmx and vmxf files into the directory with the LUN unique ID it works great. That will save me a lot of time if I have to restore 30-40 machines because of a a SAN failure.

0 Kudos
EXPRESS
Enthusiast
Enthusiast

Hey Guys,

New here, I'am about to look into this backup utility, I see their are several downloads to chose from which is the correct one for creating backups or do i need them all?

Thanks,

Thank you, Express
0 Kudos
PezJunkie
Enthusiast
Enthusiast

Virtual Infrastructure Scripted Backup Utility (VISBU)

http://www.xtravirt.com/index.php?option=com_remository&Itemid=75&func=fileinfo&id=7

0 Kudos
koit
Contributor
Contributor

Is it possible to disable the Quiescing feature in the VISBU script?

I have some serious issues with my AD domain controllers when the VM is beeing quiesced.

NB! This is not VISBU bug but a known issue with VCB/snapshot.

Look at this thread for some more info on the quiescing issue:

http://communities.vmware.com/message/850550#850550

As a workaround it would be great to manually disable quiescing during VISBU snapshots.

0 Kudos
FunkyD
Contributor
Contributor

Excuse the dumb question, my brain is a bit fried at the moment what with theat winter virus that is going round.

I know you are not suppossed to copy VMDK files from one EX server to another using say SCP or FTP because of fragmentation but does the same apply to the backup files created with this script?

I've been copying them to my remote site in preparation for testing and it suddenly dawned on me I might be heading for problems. Can anyone clarify?

Edit: Ahhh I remember now, this only applies when you are moving from an ESX file partition to a non ESX file partition e.g. to a bog standard FTP server. What effect does using tar on the vmdk files have if any? Am I ok using tar to shrink the files and then using sftp to transfer them to my remote site or am I better off doing something else? Perhaps I should leave them as they are and use say scp -C to transfer them?

Message was edited by: FunkyD

0 Kudos
FunkyD
Contributor
Contributor

I created a cfg and vml files and tested it and it worked fine. When I schedule the job I get this error in the log:

13/03/2008 10:13:02: We're running VMware ESX Server 3.0.1 build-73009

13/03/2008 10:13:02: Searching for target VMs....

13/03/2008 10:13:02: FATAL ERROR: Specified VM search file couldn't be opened: thu.vml. Exiting script.

13/03/2008 10:13:02: FATAL ERROR: VM search file was specified but no included VMs were specified! Exiting script.

Here is my cfg file:

    1. Config file created by vi-backup.pl 1.0.1 ##

hostname=servrer.domain.com

username=admin

password=secret

searchspec=thu.vml

exportpath=/vmfs/volumes/LUN4/vibackup

2gbsparse=1

safemode=1

mailreport=0

smb=0

and here is my vml file:

Include=SERVER1

Exclude=SERVER1:scsi0:1,SERVER1:scsi1:1

SERVER1 has a third scsi drive, 0:0 which is the one I want to backup. As I say, when I use the config manually it works fine - it just fails when using the scheduler.

0 Kudos
PezJunkie
Enthusiast
Enthusiast

I had the same problem originally.

In your config file, you need to use the full path to the .vml file.

0 Kudos
koit
Contributor
Contributor

I've asked this question earlier, but didn't get any response so here I go again Smiley Happy

Is it possible to disable the Quiescing feature in the VISBU script?

I have some serious issues with my AD domain controllers when the VM is beeing quiesced.

NB! This is not VISBU bug but a known issue with VCB/snapshot.

Look at this thread for some more info on the quiescing issue:

http://communities.vmware.com/message/850550#850550

As a workaround it would be great to manually disable quiescing during VISBU snapshots.

0 Kudos
FunkyD
Contributor
Contributor

Thanks. I've chaged my config file so that the line reads:

searchspec=/usr/local/vi-backup/wed.vml

However, the snapshot doesn't seem to work even manually. In the logfile I get:

14/03/2008 08:50:16: Log file opened.

14/03/2008 08:50:16: NOTE: This is a dry run, VM will not be snapshotted or exported!

14/03/2008 08:50:20: 2008-03-14 08:50:17.105 'App' 3076452480 info Current working directory: /root

2008-03-14 08:50:17.150 'BaseLibs' 14203824 warning Unsetting unknown path: /vmomi/

2008-03-14 08:50:17.242 'CreateSnapshot' 3076452480 info Creating snapshot

SsId:snapshot-2255

14/03/2008 08:50:20: VM is set to backup in safe mode.

14/03/2008 08:50:20: Exporting disk SERVERNAME.vmdk....

14/03/2008 08:50:24: Disk export failed for disk /vmfs/volumes/4603f48a-6c62fbae-fd89-00188b77740d/SERVERNAME/SERVERNAME.vmdk.

14/03/2008 08:50:28: 2008-03-14 08:50:25.078 'App' 3076444288 info Current working directory: /root

2008-03-14 08:50:25.101 'BaseLibs' 4938672 warning Unsetting unknown path: /vmomi/

14/03/2008 08:50:33: Log file closed.

It isn't clear what the problem is - any ideas?

0 Kudos
FunkyD
Contributor
Contributor

I've been having some problems with vibackup (see my other thread).

I've noticed that the lck file is not being deleted after a backup or at least in my case after a failed backup.

What I've been doing is deleting the lck file manually but that has not resolved the issue of not being able to perform subsequent backups. I'm wondering if the fact that vibackup is not deleting the lck file means perhaps it is not doing something else that it should do and causing me problems when I try to backup again?

0 Kudos