Dell DR4300e NetVault Backup - Best Practices for Setting up VTL Containers an - Page 45

Sample scripts for management of replication, failover and reclamation of disk space

Page 45 highlights

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 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 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_prefix=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 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 clean @echo echo Clean Media with Label %ML% @echo Clean Media with Label %ML% >> "%logfile%" @echo 45 Best practices for setting up Dell VTL Container or NetVault Backup native virtual tape library (nVTL)

  • 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
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52

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 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 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_prefix=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 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 *
******************************************************
:_clean
@echo ===========================================
@echo Clean Media with Label %ML%
@echo Clean Media with Label %ML% >> “%logfile%”
@echo ===========================================
:: ==============================================