Backup: RSM and Tape


Tape Backup on Windows

Many times I need to set a backup script for windows that use a tape device.

This simple script is working fine for me, you only need to use the command to detect the tape name (e.g. HP C5683A SCSI Sequential Device) :

rsm view /tlibrary

Then modify the following script with the right tape name and the correct BKS file and configure it into Scheduled Task.

echo off
net stop NtmsSvc
net start NtmsSvc
sleep 5
rsm.exe refresh /LF"HP C5683A SCSI Sequential Device"
sleep 30

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%
%systemroot%\system32\ntbackup.exe backup "@C:\Backup\Backup.bks" /n "%computername%-%dtt%" /d "daily %dtt%" /v:yes /r:no /rs:no /hc:on /m normal /j "daily %dtt%" /l:f /p "4mm DDS" /UM

rsm.exe eject /PF"%computername%-%dtt% - 1" /astart

exit
Share on Google Plus

About Vittorio Pavesi

    Blogger Comment
    Facebook Comment

0 commenti: