×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

NT BACKUP DON'T RUN WITH "AT"

NT BACKUP DON'T RUN WITH "AT"

NT BACKUP DON'T RUN WITH "AT"

(OP)
Why this schedule not activating????
Please HELP


AT 4:00   /every:F   "c:\tempbackup\Normal.bat"
AT 4:00   /every:Th  "c:\tempbackup\Normal.bat"
AT 4:00   /every:W   "c:\tempbackup\Normal.bat"
AT 4:00   /every:T   "c:\tempbackup\Normal.bat"
AT 4:00   /every:M   "c:\tempbackup\Normal.bat"
AT 4:00   /every:Su  "c:\tempbackup\Normal.bat"
AT 4:00   /every:S   "c:\tempbackup\Normal.bat"


AT 22:00  /every:F   "c:\tempbackup\Daily.bat"
AT 22:00  /every:Th  "c:\tempbackup\Daily.bat"
AT 22:00  /every:W   "c:\tempbackup\Daily.bat"
AT 22:00  /every:T   "c:\tempbackup\Daily.bat"
AT 22:00  /every:M   "c:\tempbackup\Daily.bat"
AT 15:00  /every:Su  "c:\tempbackup\Daily.bat
AT 15:00  /every:S   "c:\tempbackup\Daily.bat"

*****************************
NORMAL.BAT
*****************************





@echo off
echo ****************************************************************** >> %systemroot%\backup-log.txt
echo Backup start >> %systemroot%\backup-log.txt
time /t  >> %systemroot%\backup-log.txt
date /t >> %systemroot%\backup-log.txt
echo ****************************************************************** >> %systemroot%\backup-log.txt
echo .  >> %systemroot%\backup-log.txt

echo clean up the mess from the last backup >> %systemroot%\backup-log.txt
if exist tape.log del tape.log >> %systemroot%\backup-log.txt
if exist %temp%\tape.log del %temp%\tape.log >> %systemroot%\backup-log.txt
if exist tape.out del tape.out >> %systemroot%\backup-log.txt
if exist tape-baklog.out del tape-baklog.out >> %systemroot%\backup-log.txt
if exist date.txt del date.txt  >> %systemroot%\backup-log.txt
echo .  >> %systemroot%\backup-log.txt

echo just in case - the standardmessage is the error-message! >> %systemroot%\backup-log.txt
copy tape-err.msg tape.out >> %systemroot%\backup-log.txt
echo .  >> %systemroot%\backup-log.txt

REM #################################################################################
echo start backup - but only if tape is inserted >> %systemroot%\backup-log.txt
istapeinserted.exe /n 0 >> %systemroot%\backup-log.txt
echo .  >> %systemroot%\backup-log.txt

REM *******************        IF          ******************************************
if %errorlevel%==0 goto makebackup
goto tapemissing

REM *******************       THEN         ******************************************
  REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  :makebackup
  echo do it  >> %systemroot%\backup-log.txt
  ntbackup backup c:\ d:\ e: f: g:\Downloads i: j: /b /v /hc:on /d "Automatic Backup" /t Normal /l %temp%\tape.log  >> %systemroot%\backup-log.txt
  if exist %temp%\tape.log move %temp%\tape.log tape.log  >> %systemroot%\backup-log.txt
  echo .  >> %systemroot%\backup-log.txt
  
  REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  echo analyse the log-file >> %systemroot%\backup-log.txt
  if exist tape.log baklog /c,e,f,g >> %systemroot%\backup-log.txt
  if exist tape.out copy tape.out tape-baklog.out >> %systemroot%\backup-log.txt
  baklogX /f 8000 /t 200 >> %systemroot%\backup-log.txt
  echo .      >> %systemroot%\backup-log.txt
  
  REM ++++++++++++++++++++++++++++++++++   IF    ++++++++++++++++++++++++++++++++++++++
  if %errorlevel%==9000 goto BackupOk
  
  REM ++++++++++++++++++++++++++++++++++   ELSE  ++++++++++++++++++++++++++++++++++++++
    echo backup had problems >> %systemroot%\backup-log.txt
    copy tape-err.msg tape.out >> %systemroot%\backup-log.txt
    baklogX /f 8000 /t 200 >> tape.out
    echo .      >> %systemroot%\backup-log.txt
    goto eject

  REM ++++++++++++++++++++++++++++++++++   THEN  ++++++++++++++++++++++++++++++++++++++
    echo backup is ok >> %systemroot%\backup-log.txt
    :backupok
    copy tape-ok.msg+tape.out tape.tmp >> %systemroot%\backup-log.txt
    del tape.out >> %systemroot%\backup-log.txt
    ren tape.tmp tape.out >> %systemroot%\backup-log.txt
    echo .      >> %systemroot%\backup-log.txt
    goto eject

  REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  echo try to eject tape >> %systemroot%\backup-log.txt
  :eject
  ntbackup eject >> %systemroot%\backup-log.txt
  echo .  >> %systemroot%\backup-log.txt

  goto afterbackup

REM *******************       ELSE         ******************************************
  REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  :tapemissing
  echo TAPE IS MISSING!  >> %systemroot%\backup-log.txt
  copy tape-miss.msg tape.out >> %systemroot%\backup-log.txt
  echo 9021: The Tape was not inserted. >> tape.out
  echo .    >> %systemroot%\backup-log.txt
  goto afterbackup

REM #################################################################################
:afterbackup
echo send the log to an e-mailadress >> %systemroot%\backup-log.txt
blat tape.out -s "backuplog vom Server1" -t tom@ace.com >> %systemroot%\backup-log.txt
blat tape.out -s "backuplog vom Server1" -t tom@ace.com %systemroot%\backup-log.txt
echo .  >> %systemroot%\backup-log.txt

REM #################################################################################
echo copy the log-files into a seperate directory which is named after the current date >> %systemroot%\backup-log.txt
getdate >> date.txt
for /F "tokens=1" %%a in (date.txt) do call backups.bat %%a  >> %systemroot%\backup-log.txt
echo .  >> %systemroot%\backup-log.txt

echo ------------------------------------------------------------------ >> %systemroot%\backup-log.txt
echo Backup end >> %systemroot%\backup-log.txt
time /t  >> %systemroot%\backup-log.txt
date /t >> %systemroot%\backup-log.txt
echo ------------------------------------------------------------------ >> %systemroot%\backup-log.txt

RE: NT BACKUP DON'T RUN WITH "AT"

(OP)
Try it without the / before every in your at command, I had the same problem now it works

RE: NT BACKUP DON'T RUN WITH "AT"

(OP)
>Try it without the / before every in your at command, I >had the same problem now it works

Sorry this posting was wrong, but if you try number's instead or you have to write the full name of the day e.g.:
at 23:00 /every:monday c:\batch\backup.cmd

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close