Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Microsoft Exchange
Expertise: Beginner
Jun 16, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Stopping Services for Backup

As backup for a client, can I write a script in Exchange to shut down the service, copy all the data files to another drive, and then restart the service?

You wouldn't do that in Exchange, you'd do it with a scheduled batch file that shuts down the Exchange services.

Before I tell you how, however, let me point out that what you're talking about doing is an "Offline" backup, which is really not the best way to do this. An offline backup doesn't delete the log files and won't automatically play back the residual log files in case of a disaster recovery situation.

If you're not doing online backups, then one of two things is happening:

  1. Your log files are just building up and sooner or later you're going to run out of disk space for them.


  2. You have circular logging enabled, which is not ideal for disaster recovery.
Ask your client how much his Exchange data is worth. If it's not worth $430, then why bother backing it up at all?

That said, if you really want to do it, create a batch file with these lines in it:

net stop "Microsoft Exchange Event Service" /y 
net stop "Microsoft Exchange Internet Mail Service" /y 
net stop "Microsoft Exchange Message Transfer Agent" /y 
net stop "Microsoft Exchange Information Store" /y 
net stop "Microsoft Exchange Directory" /y 
net stop "Microsoft Exchange System Attendant" /y
Or you could just write:
net stop "Microsoft Exchange System Attendant" /y
net stop "Microsoft Exchange System Attendant" /y
net stop "Microsoft Exchange System Attendant" /y
Skip the rest of them (since they're all dependant upon the System Attendant and will be shut down when it is). Then do your backup and Net Start them all again. But I wouldn't. :)
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date