White Papers
Best practices for setting up Dell VTL Container or NetVault Backup native virtual tape library (nVTL)
45
Sample scripts for management of replication
failover and reclamation of disk space
NetVault Backup nVTL physical space reclamation script
Windows
®
platform:
@echo off
:: ==================================================================
:: The following parameters must be congured 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_prex = This should be the prex of the virtual 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_prex=YN1D set library_name=VTL1 set media_size=1000000m
set vtlpath=\\10.8.224.22\vtl1\VTL1
set nvutil=%ProgramFiles(x86)%\Dell\NetVault Backup\util set logle=%tmp%\logdd430-1clean.log
@echo. >> “%logle%”
@echo. >> “%logle%”
@echo ======================================================== >>”%logle%”
@echo Start DD Media Start>> “%logle%” date/t >> “%logle%”
time/t >> “%logle%”
@echo ======================================================== >>”%logle%” 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” | nd “%media_
prex%” > “%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 *
******************************************************
:_clean
@echo ===========================================
@echo Clean Media with Label %ML%
@echo Clean Media with Label %ML% >> “%logle%”
@echo ===========================================
:: ==============================================