Solved

Batch file to unmount and remount exchange information store

Posted on 2009-05-06
7
2,400 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

739 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