Discussion Locked

Automation of NT backup

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Iwant to know where i can find good, detailed information on how to create a batch file to automate my NT backup. Or any good ideas on how to automate NT backup.

Also for my own good i need to learn to create batch files. Pls help!!!

10 replies

by bill_w

To automate backup (or any other scheduled activity) for NT the shell command AT is a great help. AT ? at a dos shell will give you the syntax.

And for batch files? Well, batch files written for dos/win9x (ie taken from dos manuals etc) do notalways work too well under NT, but old dos manuals (you remember when Micro$oft provided actual manuals?) can help. Also the command HELP at a command prompt will list a few commands that can be used in NT batch files.

Really, the only way to learn to cut batch files (unless you can find someone else's code) is to practise. However, old library books of the type "all you want to know/idiots guide to MSDOS 3/4/5/6" may be a good source. And, of course, there's an entry for batch files under start\help\index for NT/2000.

Enjoy.
Bill

by bhrdwh

The command is "AT Backupnt.exe". you could also check Microsoft's Site fof automating backup.
Akash

by vh_s

My experience is that although you could use AT command to automate backup, in reality it doesn't work very well due to its limited capability of error handling/interactiveness.

Why ? Sometimes error occured like you forgot to put in the tape, orwrong media (tape) was put in the tapedrive. When errors occured, don't expect NT to just resume the backup processes smoothly. In fact, it does affect the performance of the server.

I would therefore recommend you to use a good backup program with the capability of scheduling backup task instead of using NTBACKUP paired with the AT command.

vh_s

by vh_s

Uh sorry, I forgot to mention one important thing.

Since AT command falls under SYSTEM (login using SYSTEM), your network drive will not be available (read NT Help file carefully). You could, of course, reinstall the network drive by using the NET USE command in your batch file, yet it would expect the network drive to be deleted after the task is completed (for full explanation see NT Help file).

by manco

Here is an example.

You will need to create a batch file for the AT command to execute.

The batch file will contains the ntbackup command with its parameters. So create a file called backup.bat in your script directory.

In this batch file you have

C:\WINNT\system32\ntbackup.exe backup C:\work /a /v /d "Daily backup of My Work directory" /t normal

c:\work this is the directory you want backed up
/a means append to the exist tape
/v verify after backup
/d description of tape
/t type of backup. in this case normal.

To automate this, you set up a AT job.
(Schedule service must be running)

Example of an AT job is

AT 22:00 /interactive /every:M,T,W,Th,F,S,Su C:\scripts\backup.bat

This job will run every day at 22:00 and will call the backup.bat file. This will then run the above backup command.

Hope this helps.

This discussion is closed to new replies.