J
Jim
I have inherited the following script for backing up a server:
--------------------------------------------------------------------
call c:\bat\stop.bat
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%
C:\WINNT\system32\NTBACKUP.EXE backup "@C:\bat\daily.bks" /n "Media created
%dtt%" /d "Set created %dtt%" /v:yes /r:no /rs:no /hc
n /m normal /j
"daily.job" /l:s /p "8mm AIT1" /UM
call c:\bat\start.bat
call logmail.bat
---------------------------------------------------------------------
Stop.bat stops some services and start.bat restarts the services.
Logmail.bat adds a header to the backup.log and puts it in the mail pickup
folder.
---------------------------------------------------------------------
The problem is that the output always has 2/14/2003 rather than the current
date:
Backup Status
Operation: Backup
Active backup destination: 4mm DDS
Media name: "Backup Set created 2/14/2003 (DEX/ERMX/SCANX)"
Backup of "C: "
Backup set #1 on media #1
Backup description: "Backup Set created 2/14/2003 (DEX/ERMX/SCANX)"
Backup Type: Normal
Backup started on 2/14/2003 at 9:35 AM.
--------------------------------------------------------------------
I noticed that the Media Name was different from what was passed on through
the script as well as the Backup Set name.
The same script runs on other machines just fine. Apparently, something is
overriding my batch. Any ideas?
Thanks
--------------------------------------------------------------------
call c:\bat\stop.bat
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%
C:\WINNT\system32\NTBACKUP.EXE backup "@C:\bat\daily.bks" /n "Media created
%dtt%" /d "Set created %dtt%" /v:yes /r:no /rs:no /hc

"daily.job" /l:s /p "8mm AIT1" /UM
call c:\bat\start.bat
call logmail.bat
---------------------------------------------------------------------
Stop.bat stops some services and start.bat restarts the services.
Logmail.bat adds a header to the backup.log and puts it in the mail pickup
folder.
---------------------------------------------------------------------
The problem is that the output always has 2/14/2003 rather than the current
date:
Backup Status
Operation: Backup
Active backup destination: 4mm DDS
Media name: "Backup Set created 2/14/2003 (DEX/ERMX/SCANX)"
Backup of "C: "
Backup set #1 on media #1
Backup description: "Backup Set created 2/14/2003 (DEX/ERMX/SCANX)"
Backup Type: Normal
Backup started on 2/14/2003 at 9:35 AM.
--------------------------------------------------------------------
I noticed that the Media Name was different from what was passed on through
the script as well as the Backup Set name.
The same script runs on other machines just fine. Apparently, something is
overriding my batch. Any ideas?
Thanks