beautypg.com

Appendix d, Windows platform script – Dell PowerVault DR2000v User Manual

Page 54

background image

54

Setting up NetVault Backup Native Virtual Tape Library on the Dell™ DR4X00 Disk Backup
Appliance

Appendix D Sample Scripts For Management

Of Replication Failover And Reclamation Of
Disk Space

NetVault Backup Native Virtual Tape Library Physical Space Reclamation
Script

Windows Platform Script:

@echo off

:: ==================================================================

:: The following parameters must be configured for the script example provided as follows:

:: vtlpath = This should be the UNC path of the root share used to host the nVTL instance.

:: media_prefix = This should be the prefix of the vitual media designated for processing

:: library_name = This should be the name of the library as it has been added to NetVault Backup
:: media_size = This is the size of the media to be recreated and must be compatibly for input to the

:: nvmakemedia command

:: ===================================================================

set media_prefix=YN1D

set library_name=VTL1

set media_size=1000000m
set vtlpath=\\10.8.224.22\vtl1\VTL1

set nvutil=%ProgramFiles(x86)%\Quest Software\NetVault Backup\util

set logfile=%tmp%\logdd430-1clean.log

@echo. >> "%logfile%"

@echo. >> "%logfile%"

@echo ======================================================== >>"%logfile%"
@echo Start DD Media Start>> "%logfile%"

date/t >> "%logfile%"

time/t >> "%logfile%"

@echo ======================================================== >>"%logfile%"

echo Stage 1 - Completed

:: ================================================

:: Look for all medias in the library with status "expired"
:: and only print lines with media infos

:: ================================================"

"%nvutil%\nvreport.exe" -class "media" -include "%%reuse = yes" -include "%%librarystatus = Online" -exclude "%%librarystatus =

Unknown" -format "%%Label %%MediaGroup" -sort "%%Label" | find "%media_prefix%" > "%tmp%\~media.txt

@echo ===========================================

@echo Processing the following List if Media
@echo ===========================================

type %tmp%\~media.txt

choice /T 5 /C jn /N /D j >NUL:

FOR /F "tokens=1,2 delims= " %%i IN (%tmp%\~media.txt) DO (

SET ML=%%i

SET GL=%%j
call :_clean %%i

)

echo Stage 2 - Completed

goto :eof

::

::

:: ******************************************************
:: * *

:: * Main Routine for every found media *

:: * Eventually adapt Timeout *

:: * according to machine type *

:: * *