Solved

Batch file to unmount and remount exchange information store

Posted on 2009-05-06
7
2,385 Views
Last Modified: 2013-11-10
Hello everyone!
We need to create a Batch File to Copy the Stores to to one of our network storage servers every 7 Days
-Example-
sat.bat   Run Every Saturday at 1AM
======
 
service dismount Store
Copy priv1.edb  priv1.stm  pub1.edb pub1.stm to \\networkserver
mount store
Done

I believe everythings pretty straight forward except the dismount and remount of the info store. Can someone help me with a bat file that acheives this? Thanks a ton!
0
Comment
Question by:Abacus IT
  • 4
  • 2
7 Comments
 
LVL 2

Accepted Solution

by:
Gregdo earned 125 total points
ID: 24317596
The following works with MS Exchange Server 2003

Stop the information store:
net stop "Microsoft Exchange Information Store"

Start the information store:
net stop "Microsoft Exchange Information Store"

Just in case you're interested, you can stop other services as well:
net stop "Microsoft Exchange Information Store"
net stop "Microsoft Exchange MTA Stacks"
net stop "Microsoft Exchange Management"
net stop "Microsoft Exchange System Attendant"
0
 
LVL 2

Expert Comment

by:Gregdo
ID: 24317616
Oops, I messed up the restart the service code.  It should be:

net start "Microsoft Exchange Information Store"
0
 
LVL 2

Expert Comment

by:Gregdo
ID: 24317813
For a complete batch file, see the attached code.  To schedule it to run on Saturday at 1:00am, use the Windows Scheduler:  Start / Control Panel / Scheduled Tasks / Add Scheduled Task.


net stop "Microsoft Exchange Information Store"
copy priv1.edb \\networkserver\SomeShare
copy priv1.stm \\networkserver\SomeShare
copy pub1.edb \\networkserver\SomeShare
copy pub1.stm \\networkserver\SomeShare
net start "Microsoft Exchange Information Store"

Open in new window

0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 65

Expert Comment

by:Mestha
ID: 24320214
Are you doing regular backups of Exchange? If not then the system that you are doing is not a valid backup procedure. You need to use an Exchange aware backup application.

Simon.
0
 
LVL 2

Expert Comment

by:Gregdo
ID: 24320666
As @Mestha says, you still need to do a backup using an Exchange aware backup program.  The reason being that Exchange creates log files in case anything goes wrong.  These log files would allow you to restore an old Exchange database and then roll forward using the transaction logs.  When you do a backup, these log files are removed as they are no longer needed.  If you don't do a backup, then these log files keep accumulating and will eventually fill your disk.

An option for an Exchange aware backup is NTBackup (comes as part of Windows).  You would be better off to schedure it to run every week and it can save it's backup to a directory on your network server.
0
 
LVL 1

Author Comment

by:Abacus IT
ID: 24326442
thanks we are using an Exchange aware backup program. My boss wants to copy the edb and stm's as well. Thanks, for the script. I will try it out!
0
 
LVL 65

Expert Comment

by:Mestha
ID: 24327555
The raw files are close to useless. As soon as new data comes in you will be unable to use them. Exchange is designed to be managed in a certain way, and that includes leaving it running 24/7 and backing it up with an Exchange aware application. Copying of the files is not something it is designed to do.

Simon.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question