Windows platform – Dell PowerVault DR6000 User Manual

Page 60

Advertising
background image

60

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

exec 10>&-

# Clean up temporary rubbish left behind

rm -rf /tmp/mediapurge

NetVault Backup Native Virtual Tape Library Bulk Mark for Reuse script

Windows Platform

@echo off

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

:: Setup Vars

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

set nvutil=%ProgramFiles(x86)%\Quest Software\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

Advertising
This manual is related to the following products: