It is currently Sun Sep 05, 2010 9:42 am




Post new topic Reply to topic  [ 1 post ] 
123-VCB Image Capture Script 
Author Message
Site Admin

Joined: Wed Jan 07, 2009 8:48 pm
Posts: 18
Location: UK, Lincolnshire
Post 123-VCB Image Capture Script
Attachment:
VCBImage.zip [2.04 KiB]
Downloaded 68 times

123-VCB - Symantec Backup Exec alternative FREE
Free and easy to use image capture script which runs along side the Vmware Consolidated Backup software package.

This script can be used with scheduled tasks to automate week / months of backups and maintain your file-structure whilst tidying up old backups.

This is a very simple to use script:
Code:
@echo off

echo ##  #####  #####     #####  #####  ##     ## ##  #####  #####  #####  ##  ##  #####
echo ##     ##     ##     ##     ## ##  ##     ## ##    #      #    ## ##  ### ##  ##
echo ##  #####    ###  #  #####  ## ##  ##     ## ##    #      #    ## ##  ## ###  #####
echo ##  ##        ##        ##  ## ##  ##     ## ##    #      #    ## ##  ##  ##     ##
echo ##  #####  #####     #####  #####  #####  #####    #    #####  #####  ##  ##  #####
echo Copyright www.123solutions.com   
echo ..
echo Developed by:
echo       Mike Wroughtron
echo       Steven Church                                       

REM =========================================================================
REM =========================================================================
REM This script takes an argument in the form of a virtual server's hostname,
REM it will then remove an old backup if it exists and take a new backup

REM ############CHANGE THE BELOW VARIABLES#############
SET USERNAME=YourDomainUSERNAME
SET PASSWORD=YourPASSWORD
SET VCBPATH=C:\Program Files (x86)\VMware\VMware Consolidated Backup Framework\vcbmounter
SET VSPHERESERVER=YourServer

REM ##############################################
REM ############CHANGE THE BELOW SETTING##############
REM Change this to the path of you stored images
cd N:\VMImages
N:

REM ##############################################
REM ############CHANGE THE BELOW SETTING##############
REM Change to your stored directory
SET DIRECTORYPATH=N:\VMImages
REM ##############################################
REM =========================================================================
REM =========================================================================


REM SET UP THE VARIABLES FOR THE "FOR LOOP"
REM ***************************************

REM : SET LOOPVAR to the ammount od weeks / days
SET /A LOOPVAR=%3 + 1


IF EXIST %DIRECTORYPATH%\%1-%2-%3 rmdir %DIRECTORYPATH%\%1-%2-%3
:BEGINING


REM : Check to see if loopvar is greater than 1
IF %LOOPVAR% lss 1 GOTO ENDLOOPVAR
IF %LOOPVAR% gtr 0 GOTO LOOPER

REM : Start loopvar
:LOOPER

SET /A LOOPVAR=%LOOPVAR% - 1
SET /A LOOPVARINC=%LOOPVAR% + 1
REN %DIRECTORYPATH%\%1-%2-%LOOPVAR% %1-%2-%LOOPVARINC%
goto BEGINING

:ENDLOOPVAR
"%VCBPATH%" -h %VSPHERESERVER% -m san -u %USERNAME% -p %PASSWORD% -a ipaddr:%1 -r "%DIRECTORYPATH%\%1-%2-1" -t fullvm


Instillation Instructions

Prerequisites:
- Vmware Consolidated Backup

1. Download the zip file attached to this thread
2. Unzip to C:\Windows
3. Set up a scheduled task to run the following example:

Execute Program : C:\windows\VCBImage.cmd
Parameters: yourserver WEEK 4


The breakdown of this is as follows:
Parameter 1: Your Server Name
Parameter 2: A comment, we use WEEK or DAYS, depending how frequent you do VCB Backups
Parameter 3: How many time you want it backed up. If set to a weekly backup and this is 4 it will keep 4 weeks of backups.

Job done :)

_________________
OS : Windows Vista Business
RAM : 4.00 Gb
CPU : Intel Core 2 Duo 2.33Ghz E6550
Graphics : Nvidia Geforce 8600 GT


Wed Feb 10, 2010 11:35 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Edited by 123-Solutions.com