Backup Script for Windows 2000 Server

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:blush: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
 
J

Jerold Schulman

It is possible that logmail.bat is mailing the wrong log.
Logon as the username that runs the backup.
Open ntbackup.exe and use the Tools menu to see what actually happened.


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:blush: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


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top