BackupWin

If you insert BackupWin on scheduled operations it will do the backup, test it and power off the server.
The only operation to remember is change the tape.
The script could be used only if for the backup is enough one tape.


@echo off
rem delete old backup logs, check NTBackup data path!
del "%USERPROFILE%\Impostazioni locali\Dati applicazioni\Microsoft\Windows NT\NTBackup\data\*.log"
rem set tape name
set nomenastro=Nastro creato il giorno %date%
rem set group name
set nomegruppo="Set creato il giorno %date%"
rem read the tape, you must change device name with yours!
start /WAIT C:\WINNT\system32\rsm.exe refresh /lf"HP C5683A SCSI Sequential Device"
sleep 60
rem start backup, change NTBackup path and backup settings file name
start /WAIT C:\WINNT\system32\NTBACKUP.EXE backup "@C:\Documents and Settings\Administrator\Impostazioni locali\Dati applicazioni\Microsoft\Windows NT\NTBackup\data\backup giornaliero.bks" /n "%nomenastro%" /d %nomegruppo% /v:yes /r:yes /rs:no /hc:on /m normal /j "Backup giornaliero" /l:s /p "4mm DDS" /UM
rem move the logfile to default name, check your path
ren "%USERPROFILE%\Impostazioni locali\Dati applicazioni\Microsoft\Windows NT\NTBackup\data\*.log" mail.log
rem send logfile by email, change adress and check logfile path 
bmail -s smtp.fastwebnet.it -t address1@yourdomain.com,address2@yourdomain.com,address3@yourdomain.com -f serveraddress@yourdomain.com -h -a Backup -m "%USERPROFILE%\Impostazioni locali\Dati applicazioni\Microsoft\Windows NT\NTBackup\data\mail.log"
sleep 600
rem eject the tape
start /WAIT C:\WINNT\system32\rsm.exe eject /PF"%nomenastro% - 1" /astart
rem rem shutdown the computer
C:\WINNT\system32\TSSHUTDN.EXE 1200 /DELAY:0 /POWERDOWN


	

Tested on Windows 2000 server.



THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.