General discussion

Locked

Automating a backup

By ftnalex ·
I'm trying to automate the backup of our Win NT Server box. It contains Exchange server 5.5 as well as acting as our PDC on the network. I'm using WinAT to schedule the start of the back up and I'm using the back up program that is included with NT Server. I know I have to stop the Exchange server services before the back up can begin so in the batch file that I'm writing, I have the lines to stop the Exchange server first. The lines work, but when I stop a service, I have to answer "y" when asked if I really want to stop this service. How can include this answer into my batch program so that I don't have to be present? Here is a sample of the stop lines I'm using:

NET STOP MSExchangeDS
NET STOP MSExchangeES
NET STOP MSExchangeIS
NET STOP MSExchangeIMC
NET STOP MSExchangeMTA
NET STOP MSExchangeSA

What should I add to these lines to have this run without my being there? Thank you for your assistance.

Jason Alexander

This conversation is currently closed to new comments.

11 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Automating a backup

by frec1 In reply to Automating a backup

You should save them as a batch file.

NET STOP MSExchangeDS
NET STOP MSExchangeES
NET STOP MSExchangeIS
NET STOP MSExchangeIMC
NET STOP MSExchangeMTA
NET STOP MSExchangeSA

Save it to your desktop or harddrive and use the utility called "Task.exe" Schedule this batch to run before your backup runs. I in the following situation. I just need to automate my Oracle backups. Another way to do this would be inside the NT backup program if you get an option to run a file before the backup run the batch.

Good Luck,
FREC

Collapse -

Automating a backup

by ftnalex In reply to Automating a backup

When I try to run the file, I get a message asking me if I really want to stop these services. I have to type yes to proceed. I want to find a way to have this yes answer already in place so I don't have to be present to type it when I want to runmy back up. Thank you for any further advice.

Jason

Collapse -

Automating a backup

by Tech/Admin In reply to Automating a backup

Have you tried adding /y to each line, this is how I answer yes automatically passing it to the command.

Collapse -

Automating a backup

by ftnalex In reply to Automating a backup

I tried adding the /y to my batch file last night and it ran like a charm. Thanks to everyone for your help.

Jason

Collapse -

Automating a backup

by WannaDrunk? In reply to Automating a backup

Regarding Answer 2, you have to put /Y to answer Yes automaticly.

Let me suggest to use the third party backup software e.g. Veritas Backup Exec which you can do the online backup without stopping the services.

Collapse -

Automating a backup

by ftnalex In reply to Automating a backup

Poster rated this answer

Collapse -

Automating a backup

by peace monger In reply to Automating a backup

You could write a batch file called test.bat
containing
NET STOP MSExchangeDS

and a text file named ANS
which contains either Y or YES (whichever is appropriate0, then call the batch file like this:

TEST < ANS

The answer is automatically furnished via a DOS pipe.

Collapse -

Automating a backup

by ftnalex In reply to Automating a backup

Poster rated this answer

Collapse -

Automating a backup

by chris hirst In reply to Automating a backup

You are obviously trying to set up an off-line backup, Why not automate the on-line backup instead, It is much easier if you need to restore at any time. An off-line backup needs patching before restarting and should only be a last resort method of recovery, also if your IS is getting fairly large (and it does) the time to restart the services ( IN THE CORRECT ORDER ) can get quite lengthy and may not have completed as users start to connect,
if you look up backing up using Books On Line (part of exchange install) you will find full instructions on how to set up NT Backup to perform both off-line and on-line operations


Chris

Collapse -

Automating a backup

by ftnalex In reply to Automating a backup

Poster rated this answer

Back to Windows Forum
11 total posts (Page 1 of 2)   01 | 02   Next

Related Forums