Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bat files for automatic backup

Status
Not open for further replies.

123gad

IS-IT--Management
Joined
Mar 12, 2001
Messages
220
Location
US
Hi, I need to schedule a backup thru NT backup, on a tape drive, to automatically backup at 11 p.m. Monday thru friday.
What would be the steps I have to do or how do I write the bat files?

PLease be very detailed, since I'm no expert in it.
Thanks for all your help,
 
Have a look at the 'AT' commands (repeat 'AT', not BAT!).

This is a type of batch/script language for NT. You can use that to schedule commands.
 
Hi,

If you could give a bit more info, we can help.

IE

What drives are to be backed up?? C:, D:??
Do you need a log file, where do you want it to go on the drive?
Do you need to use hardware compression?

But the at command will be something like.

AT 23:00 /EVERY:M,T,W,TH,F C:\BACKUP.BAT

Also make sure the schedule service is running and set to automatic, to check this look in start/settings/control panel/services. Make sure the "schedule" or "task scheduler" service is started and set the automatic. If not start the service and set the startup type to automatic.

Where backup.bat is the batch file to backup the data.

A batch flie to backup the C: and D: drives, and the local registry then verify the data, and use hardware compression, then put the log file in a folder called c:\backuplogs would be.

@echo off
ntbackup backup C: D: /v /b /hc:on /l "c:\backuplogs\backup.log /t normal
ntbackup eject

Think thats about it.

Paul
 
this is the file I created to automatically backup to my tape drive:

ntbackup backup D: /v

and saved it to my C: drive as backup.cmd

then I went to a command line and entered:

at 23:00 /every:M,T,W,TH,F C:\backup.cmd


I opened the Backup and selected all the files I would like to backup and minimized it

Does this sound right or do I have to do what Paulovey wrote:

@echo off
ntbackup backup C: D: /v /b /hc:on /I"c:\backuplogs\backup.log /t
normal
ntbackup eject

I don't think I need Hardware compression.
Do I save it as .bat or .cmd

Thanks for all your help
 
Use the batch file that Paulovey posted and save it as SVRBACKUP.BAT into a folder called C:\BACKUPLOGS

For the AT command try....

AT 11:00 /EVERY:M,T,W,TH,F "C:\BACKUPLOGS\SVRBACKUP.BAT"

Use the AT command with no switched to view the schedular list.


New Zealand, a great place to live.
tokala@orcon.net.nz
 
OK, so are we all happy with the batch file and command?
Let me now if not!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top