Solved

Batch file to unmount and remount exchange information store

Posted on 2009-05-06
7
2,378 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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 fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

864 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now