G
Guest
Hello
Have a strange one here that is driving me mad. In our environment I am
happily running scripted ntbackup jobs to complete small backups to file on
windows 2000 servers. Recently I have tried to port one of these scripts to
a 2003 server with no success. The script is as follows:
@echo off
REM - Batch file created to perform a daily backup to file on sh178edera and
move file from sh178edera to \\sh155edera\sh161Backups for tivoli tape backup.
REM - Graeme Lockhart 02/11/04
net stop "ADAM_LDAP-Staging-Area"
sleep 5
net stop "MIIServer"
sleep 5
net stop "sqlserveragent"
sleep 10
net stop "mssqlserver"
sleep 10
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%
set dt=%dt%
c:\windows\system32\ntbackup.exe backup "@e:\backups\sh179ederadaily.bks"
/n "%computername%-%dtt%" /d "daily %dtt%" /v:no /r:no /rs:no /hcff /m
normal /j "SH179EDERA%dtt%" /l:s /f "e:\Backups\sh179edera%dtt%.bkf"
net start "mssqlserver"
sleep 10
net start "sqlserveragent"
sleep 10
net start "MIIServer"
sleep 5
net start "ADAM_LDAP-Staging-Area"
sleep 5
rem Copy backup summary logs to c:\backups folder from scheduled user
servicetSM
copy "C:\Documents and Settings\servicetsm\Local Settings\Application
Data\Microsoft\Windows NT\NTbackup\Data\backup*.log" e:\backups\*.* /
rem Copy backup file to sh155edera\sh178backups
net use z: /delete
net use z: \\ic001dc\sh179Backups
copy /Y e:\backups\SH179EDERA%dt%* z:\
REM del /Q e:\backups\*.bkf
net use z: /delete
exit
When the script run with bks script file surrounded by quotes and the @ is
normally required the backup fails and reports that it cannot see the bks
file. The BKS file is in the correct location is configured correctly.
If I remove the @ the backup starts but starts a shadow copy of the E
partition and completes in seconds. There is only 100MB or so at the moment
on the partition. However the BKS file is configured to back up only
selected folders on the C and E partitiions plus the system state.
The scripts function correctly on W2K servers. I have confirmed with MS
documentation at it states the BKS file must be prefixed with the @ and
quotes.
Has anyone come across this issue? Is is a Win 2003 issue?
Very frustated. Appreciate anyones help.
Have a strange one here that is driving me mad. In our environment I am
happily running scripted ntbackup jobs to complete small backups to file on
windows 2000 servers. Recently I have tried to port one of these scripts to
a 2003 server with no success. The script is as follows:
@echo off
REM - Batch file created to perform a daily backup to file on sh178edera and
move file from sh178edera to \\sh155edera\sh161Backups for tivoli tape backup.
REM - Graeme Lockhart 02/11/04
net stop "ADAM_LDAP-Staging-Area"
sleep 5
net stop "MIIServer"
sleep 5
net stop "sqlserveragent"
sleep 10
net stop "mssqlserver"
sleep 10
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%
set dt=%dt%
c:\windows\system32\ntbackup.exe backup "@e:\backups\sh179ederadaily.bks"
/n "%computername%-%dtt%" /d "daily %dtt%" /v:no /r:no /rs:no /hcff /m
normal /j "SH179EDERA%dtt%" /l:s /f "e:\Backups\sh179edera%dtt%.bkf"
net start "mssqlserver"
sleep 10
net start "sqlserveragent"
sleep 10
net start "MIIServer"
sleep 5
net start "ADAM_LDAP-Staging-Area"
sleep 5
rem Copy backup summary logs to c:\backups folder from scheduled user
servicetSM
copy "C:\Documents and Settings\servicetsm\Local Settings\Application
Data\Microsoft\Windows NT\NTbackup\Data\backup*.log" e:\backups\*.* /
rem Copy backup file to sh155edera\sh178backups
net use z: /delete
net use z: \\ic001dc\sh179Backups
copy /Y e:\backups\SH179EDERA%dt%* z:\
REM del /Q e:\backups\*.bkf
net use z: /delete
exit
When the script run with bks script file surrounded by quotes and the @ is
normally required the backup fails and reports that it cannot see the bks
file. The BKS file is in the correct location is configured correctly.
If I remove the @ the backup starts but starts a shadow copy of the E
partition and completes in seconds. There is only 100MB or so at the moment
on the partition. However the BKS file is configured to back up only
selected folders on the C and E partitiions plus the system state.
The scripts function correctly on W2K servers. I have confirmed with MS
documentation at it states the BKS file must be prefixed with the @ and
quotes.
Has anyone come across this issue? Is is a Win 2003 issue?
Very frustated. Appreciate anyones help.