A script for backing up the latest .VBK file

#1 VM Backup : Modern Data Protection for VMware vSphere and Microsoft Hyper-V

A script for backing up the latest .VBK file

Postby slidek9 » Fri Jul 01, 2011 3:20 pm

Hi,
We was having some woes with large (160GB+) diffs on reverse incremental speeds, so we had to switch to forward incrementals.
As a result we would have mutiple .VBK files (each over 2TB in size) of one VBK per week (14 days worth so 2 to 3 .vbks on the disk at all times).
We did not want to backup mutiple VBK files each week (duplicate backups).
The backup to tape software (legato) would not allow us to backup only the most recent .vbk (no such filter) but it would accept a input text file to point to the files to backup.

So I want to share the solution incase someone else finds them useful:

MSDOS batch file of course :-)

Code: Select all
dir W:\Veeam\SQL\*.vbk /O-D /B /S > v:\Scripts\G7.txt

for /f "usebackq delims=;" %%a in (v:\Scripts\G7.txt) do (
echo %%a
exit /B
) > v:\scripts\Saveset-list.txt


Code: Select all
dir W:\Veeam\SQL2\*.vbk /O-D /B /S > v:\Scripts\G8.txt

for /f "usebackq delims=;" %%a in (v:\Scripts\G8.txt) do (
echo %%a
exit /b
) >> v:\scripts\Saveset-list.txt


The files above are called from another batchfile so they can exit back and do the next one.

Code: Select all
rem ###########################################
rem #            SQL Group 7                  #
rem ###########################################

call V:\scripts\G7.bat

rem ###########################################
rem #            SQL Group 8                  #
rem ###########################################

call V:\scripts\G8.cmd


Anyway I hope someone finds it useful :D

- leon
slidek9
Enthusiast
 
Posts: 43
Liked: never
Joined: Tue Apr 20, 2010 5:00 pm
Full Name: Leon

Re: A script for backing up the latest .VBK file with Legato

Postby Gostev » Fri Jul 01, 2011 3:22 pm

Hi Leon, thank you very much for sharing this!
Gostev
Veeam Software
 
Posts: 12925
Liked: 315 times
Joined: Sun Jan 01, 2006 1:01 am
Full Name: Anton Gostev


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher and 11 guests