Template for Tape Backups |
Top Previous Next |
REM DOS script to automate backup using ntbackup.exe to a tape device
rsm.exe refresh /LF"[BACKUP_DEVICE]"
sleep 30
REM Create Backup Name based on date and time for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set DT=%%i-%%j-%%k-%%l for /f "Tokens=1" %%i in ('time /t') do set TM=-%%i
set TM=%TM::=-% set DTT=%DT%%TM%
REM Execute Backup %SYSTEMROOT%\system32\NTBACKUP.EXE backup "@[BACKUP_FILE]" /n "%DTT%" /d "%DTT%" /v:no /r:no /rs:no /hc:on /m normal /j "%DTT%" /l:f /p "[BACKUP_DESTINATION]" /um
REM Eject Tape rsm.exe eject /PF"%DTT% - 1" /astart
exit
|