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

NetVault Backup nVTL bulk mark for reuse script

Page 51 highlights

NetVault Backup nVTL bulk mark for reuse script Windows® platform @echo off Setup Vars set nvutil=%ProgramFiles(x86)%\Dell\NetVault Backup\util setlocal enabledelayedexpansion set logfile=%tmp%\logdd430-1purge.log set "media_prefix Capture Vars input CLS set /p media_prefix=Enter the Media Label Prefix to Purge (enter . to exit): IF "%media_prefix%"=="." GOTO :eof IF "%media_prefix%"=="" GOTO input :: Begin Works echo Stage 1 - Begin: Setup Logging @echo. >> "%logfile%" @echo. >> "%logfile%" @echo logfile%" @echo Start DD Media Start>> "%logfile%" date/t >> "%logfile%" time/t >> "%logfile%" @echo logfile%" echo Stage 1 - Completed: Log file created Look for all medias in the library with barcode prefix :: and mark media for reuse - print lines with media infos echo Stage 2 - Begin: Capture Media to be processed for reuse "%nvutil%\nvreport.exe" -class "media" -format "%%Label %%MediaGroup" -sort "%%Label" | find "%media_ prefix%" > "%tmp%\~mediareuse.txt" echo The following media will be processed for reuse: type %tmp%\~mediareuse.txt echo Stage 2 - Completed: Capture Media Media List has been defined FOR /F "tokens=1,2 delims= " %%i IN (%tmp%\~mediareuse.txt) DO ( SET ML=%%i SET GL=%%j call :_expire %%i ) echo Stage 3 - Completed goto :eof :_expire @echo echo Expire Media with Label %ML% @echo Expire Media with Label %ML% >> "%logfile%" @echo nvutil%\nvreusemedia.exe" -barcode "%ML%" goto :eof 51 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)
51
NetVault Backup nVTL bulk mark for reuse script
Windows
®
platform
@echo off
:: ====================================================================
:: Setup Vars
:: ====================================================================
set nvutil=%ProgramFiles(x86)%\Dell\NetVault Backup\util setlocal enabledelayedexpansion
set logfile=%tmp%\logdd430-1purge.log
set “media_prefix=”
:: ====================================================================
:: Capture Vars
:: ====================================================================
:input
CLS
set /p media_prefix=Enter the Media Label Prefix to Purge (enter . to exit): IF “%media_prefix%”==”.” GOTO
:eof
IF “%media_prefix%”==”” GOTO input
::
====================================================================
:: Begin Works
:: ====================================================================
echo Stage 1 - Begin: Setup Logging
@echo. >> “%logfile%”
@echo. >> “%logfile%”
@echo ======================================================== >>”%logfile%”
@echo Start DD Media Start>> “%logfile%” date/t >> “%logfile%”
time/t >> “%logfile%”
@echo ======================================================== >>”%logfile%” echo Stage 1 - Completed:
Log file created
::
::
:: ================================================
:: Look for all medias in the library with barcode prefix
:: and mark media for reuse - print lines with media infos
:: ================================================”
echo Stage 2 - Begin: Capture Media to be processed for reuse
“%nvutil%\nvreport.exe” -class “media” -format “%%Label %%MediaGroup” -sort “%%Label” | find “%media_
prefix%” > “%tmp%\~mediareuse.txt”
echo The following media will be processed for reuse:
type %tmp%\~mediareuse.txt
echo Stage 2 - Completed: Capture Media Media List has been defined
FOR /F “tokens=1,2 delims= “ %%i IN (%tmp%\~mediareuse.txt) DO ( SET ML=%%i
SET GL=%%j
call :_expire %%i
)
echo Stage 3 - Completed goto :eof
:_expire
@echo ===========================================
@echo Expire Media with Label %ML%
@echo Expire Media with Label %ML% >> “%logfile%”
@echo =========================================== “%nvutil%\nvreusemedia.exe” -barcode “%ML%”
goto :eof