Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Drive Snapshot automation

Reply
 
Old 11-17-2008   #1 (permalink)
Tyler Durden


 
 

Drive Snapshot automation

(I could not find any batch scripting group, so asking for help here.)

I'm stuck here!
I need help on the following script to automate Drive Snapshot. It should
recognizes volumes names on the command line, repeating the snapshot for
each one of them, and -dif parameter to add a -h(lasthashhere) using the
most recent hash on the backup destination, according to the same volume
drive letter (the most recent hash must have the same drive letter of the
volume of the backup).

Naming convention is:
$computername-$disk-$day$month$year-$type.sna

Maybe would be better to set %destdir% as a command line parameter too,
would avoid script edition. This script would be perfect to automate any
backup need, from a scheduled task at a windows server that does a full
backup of various volumes once in a month and another task with daily
differentials, and also to full backup a single computer and his only system
volume c:. (no command line parameters on this scenario)

I hope that I made myself clear Any help would be really appreciated.

@echo off
setlocal

rem (The following line is the only customizable parameter, maybe better as
a command line parameter?)
set destdir=\\temp1\backups
set destdir=%destdir%\%computername%

if not exist %destdir% md %destdir%

if [%1]==[] set %1=c:

:loop
if [%1]==[] goto continue
snapshot.exe %1
%destdir%\$computername-$disk-$day$month$year-$type.sna -Go -T
shift
goto loop

:continue







My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Hyper-V snapshot problem Virtual Server
How to do a QUICK snapshot of the vhd file ? Virtual Server
Snapshot Vista General
Snapshot on Mediaplayer Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46