Solved

Batch file to unmount and remount exchange information store

Posted on 2009-05-06
7
2,394 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
Technology Partners: 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help Creating PowerShell Script 5 64
Octopus Deploy: need a Time Event that fires every midnight 2 29
learn programming 8 66
Ruby or Python 7 47
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…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

735 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