Comprehensive data protection for all workloads
Post Reply
slidek9
Enthusiast
Posts: 44
Liked: never
Joined: Apr 20, 2010 5:00 pm
Full Name: Leon
Contact:

A script for backing up the latest .VBK file

Post by slidek9 »

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
Gostev
Chief Product Officer
Posts: 31533
Liked: 6703 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

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

Post by Gostev »

Hi Leon, thank you very much for sharing this!
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 121 guests