VCB Script to backup full VM's in batches

steagu

Newcomer
Joined
Nov 11, 2008
Messages
4
Reaction score
0
Points
0
This is the script that I use to backup 36 VM's (full VMDKs) in one evening. I don't have sufficient space on my VCB proxy to mount them all at once so I mount them in batches. I've also configured an email notification if a snapshot fails.

What the script does is mount each virtual machine one by one. Then it will check that the mount was successful and if it wasn't it will try the mount again. If the mount fails, it will send an email notification and then create a blank directory so the script can carry on.

Once the checking is done, the script invokes the TSM command line (dont forget to exclude everything except the MNT folder) and then cleans up the MNT directory so the next batch of machines can be mounted.

To schedule it, I use the Windows Task scheduler service so this takes out any issues with the TSM Scheduler.

I've had this running for about 2 weeks now and it's working great. Hope it can help somebody else.
 

Attachments

  • vcbscript.txt
    52.1 KB · Views: 306
Last edited:
Hello steagu,

As I couldn't use your batch, I wrote my own script in vbscript (with your batch as a good reference).
That solved my problem with VCB backups and storage space :)

When I ran your batch (modified to my environment) it got stuck in a loop at the error handling part.
The snapshot was created, but somehow the batch didn't 'see' the newly created servername folder.
After removing the error handling part, the snapshot was created, the backup worked, and than just exited as soon as the backup finished.
Which caused not starting the next batch...

Don't get me wrong, I'm not saying your script is faulty...
It probably has something to do with the way my VCB environment is set up.

Anyway, thanks a lot for sharing your batch! It sure helped me :D
 
Gibson,

Would you be able to post your vbscript? It would be much appreciated!
 
Back
Top