Dette er ikke nogen nem sag, men her har du et dokument som evt. kan hjælpe dig.
Exchange Disaster Recovery
in a Nutshell
1 General information
1.1 Software agents
In case of a disaster recovery scenario, you should always make sure there are no software agents running in the background. Meaning: you should verify that you, as the administrator, remove the virus scanner, or any other software agent that runs in the background, from the system first. This is really important, because the point is that the mail server should be up and running again and problems with locked files or any other problem should be avoided before taking any action.
1.2 Solving the actual cause is more important
Secondly there is the event log file. Event log files are extremely important in case of disaster recovery. Looking at the actual course of the disaster and even better, solving the original problem first, is the best course of action. In this case you can set the Exchange services to manual and after you have rebooted the Exchange server, check what events are popping up.
1.3 Hardware and software requirements
Another thing is that Exchange uses loads of free hard disk space and RAM (Random Access Memory). Make sure you have enough of both of them. Configure the paging file to at least total RAM * 1.5 or total RAM * 2 for the minimum size. The maximum size of the paging file should be set to a higher size.
2 Exchange and the tools to use
2.1 Getting Exchange up and running again and minimizing downtime
In case of a disaster recovery scenario, the administrator has to decide if he wants to restore from latest backup or “try” to get the databases back to a consistent state. First of all, the administrator has to verify that there is a recent backup available. If there isn’t, there are not many options left. However, if there is one, the administrator has to verify if the backup is recent and if the backup is consistent.
In general there are two options here:
1. Restore from previous backup.
2. Run some integrity tools on the Exchange databases.
2.2 General information on the tools
With Exchange 4.0 and 5.x, there are some tools you can use to get the system up and running again. You can find these tools in the following folder:
X:\\EXCHSRVR\\BIN
In case of disaster recovery scenario, please make sure you understand the several risks of using these tools. You can find more information on the Internet, for example:
In case of disaster recovery scenario, please make sure you understand the several risks of using these tools. You can find more information on the Internet, for example:
1.
http://www.microsoft.com/exchange/DeployAdmin/DeployAdmin.htm.2.
http://www.microsoft.com/technet/support/default.htm. 2.3 Most important tools for a disaster recovery scenario
The tools that make the administrator’s live more easily.
1. Isinteg.exe.
2. Eseutil.exe or edbutil (in case of Exchange 4.0 or Exchange 5.5).
3 Three things to take into consideration
3.1 Exchange Optimizer
After you have successfully installed Exchange, Exchange asks the administrator if he wants to run the Exchange Optimizer. This is a really cool tool that separates the Exchange databases and Exchange log files from each other. Of course the tool does more than that, however the Exchange Optimizer will not be discussed in this document. In case of disaster recovery, you should really make sure you understand the way Microsoft Exchange stores the data.
Let me summarize the most important folders.
1. First of all, there are the program files. Exchange program files are located in the following folder: \\EXCHSRVR\\BIN.
2. The information store (priv.edb/pub.edb and some other files) is located in the following folder: \\EXCHSRVR\\MDBDATA.
3. The directory store (dir.edb and some other files) is located in the following folder: \\EXCHSRVR\\DSADATA.
4. The MTA-dat files (*.dat) are located in the following folder: \\EXCHSRVR\\MTADATA.
However, remember that after you have run the Exchange Optimizer, there is not just one \\MDBDATA folder. Exchange places the data and the log files at separate locations. The trick is that you should backup all the folders named \\MDBDATA and all the folders named \\DSADATA
We will cover this thing when we discuss the several tools.
3.2 Exchange databases and Log files
Generally, if you understand that log files and Exchange databases can be corrupt, you will understand the most important things of disaster recovery. That means that, after you have scanned the Exchange databases for corruption, after that you have noticed that there is no corruption involved, there still might be a possibility that you cannot start up one or all of the Exchange services.
We will cover this thing when we discuss the several tools.
3.3 Mta (Message Transfer Agent) problems
Another thing that an administrator should take into account is that the Exchange services are dependent on each other. Meaning, even if you have verified that the Exchange databases are in the “Consistent” state and even after you have removed the log files, the Information store still doesn’t start up.
In this case, you will have to look into the event viewer. Are there any, for example MTA, problems mentioned? If you start up the SA (System Attendant) and the MTA, is there an error mentioned? In most cases there will be the 2140 error. This is the most common error and does not give you a clue. However, the trick is here that you will have to look in the event viewer again.
Problems with SA and MTA will not be discussed in this document.
4 Tools and parameters and general precaution
4.1 General precaution: Disk Space
Exchange 4.0 and 5.0
--------------------
Exchange will need 110% of the size of the priv.edb and pub.edb files in free disk space. The question here is if the customer already freed up hard disk space. During disaster recovery, this is really important.
Exchange 5.5
------------
Exchange will need 25% of the size of the priv.edb and pub.edb files in free disk space. The question here is if the customer already freed up hard disk space. During disaster recovery, this is really important.
4.2 What is needed for a successful Exchange recovery
Before running any tools on the Exchange databases, you should make sure you have a consistent and recent backup of the following files:
1. Priv.edb (mail messages).
2. Pub.edb (public folder hierarchy).
3. Dir.edb (objects within Exchange).
Best practice is that you stop all the Exchange services and make a file copy of the following folders:
EXCHSRVR\\MDBDATA.
EXCHSRVR\\DSADATA.
NOTE: make sure you have a copy of all the \\EXCHSRVR\\MDBDATA and \\EXCHSRVR\\DSADATA folders. For more information, see the Online Help within Exchange Administrator and search for “Exchange Optimizer”. Check all your hard drives or partitions. There might be a case that there are more than one \\MDBDATA and \\DSADATA folders. You need to back all of these folders first.
4.3 The parameters
4.3.1 Checking the state of each database
Exchange 4.0 and 5.0
--------------------
EDBUTIL /mh x:\\exchsrvr\\mdbdata\\priv.edb > privmh.txt.
EDBUTIL /mh x:\\exchsrvr\\mdbdata\\pub.edb > pubmh.txt.
EDBUTIL /mh x:\\exchsrvr\\dsadata\\dir.edb > dirmh.txt.
Exchange 5.5
--------------------
ESEUTIL /mh x:\\exchsrvr\\mdbdata\\priv.edb > privmh.txt.
ESEUTIL /mh x:\\exchsrvr\\mdbdata\\pub.edb > pubmh.txt.
ESEUTIL /mh x:\\exchsrvr\\dsadata\\dir.edb > dirmh.txt.
NOTE: if you run this tool from the \\EXCHSRVR\\BIN folder, the text file will be placed in the same folder. You can view the output with a standard editor such as notepad or edit.com. Running the tool again, replaces the original text file. It does not append the new data to the text file. There is no need to run the tools in the order documented in this document.
The output, will give you the clue whether the “State” of the Exchange databases are “Consistent” or not (“Inconsistent”).
NOTE: if the state is of each database is consistent, and you still cannot start up the Exchange services, you might want to look at the log files. There is no need to run the same tool again with different parameters. The solution in that scenario will be that you clear all the files out of the \\MDBDATA folder except for the priv.edb and pub.edb files and that you clear all the files out of the \\DSADATA folder except for the dir.edb.
NOTE: if you “delete” these files from the \\MDBDATA folder without making a file copy of them, there is no way that you can use the same files again. Just moving them to a save location (for example in the folder \\BACKUP\\MDBDATA) will be better.
After you have moved all the files from the \\MDBDATA folder except for the priv.edb and the pub.edb files and after you have moved all the files from the \\DSADATA folder except for the dir.edb file, start up the SA, MTA and DS (Directory Store). From a command prompt (\\EXCHSRVR\\BIN), run the following command
ISINTEG - PATCH
After that this tool has completed succesfully, start up the rest of the services.
4.3.2 Making the databases consistent: caution
Assuming that each database is “Inconsistent”. That means that the administrator will have to do some scanning and run some basic integrity checks.
The precaution in this case is that you have made a file copy of ALL (in case of the Exchange Optimizer) of the following folders:
\\EXCHSRVR\\MDBDATA
\\EXCHSRVR\\DSADATA
4.3.2.1 The scanning itself
Note: all the Exchange Services should have been stopped.
Exchange 4.0 and 5.0
------------
EDBUTIL /d /r /ispriv.
EDBUTIL /d /r /ispub.
Exchange 5.5
------------
ESEUTIL /p /ispriv.
ESEUTIL /p /ispub.
NOTE: where x: is the drive containing the required free disk space.
After you have run the repair option of the edbutil or eseutil tool for each database, you should start up the SA, MTA and DS. It should start now. If it doesn’t start, just have a look at paragraph regarding the log files. There might be a possibility that they are corrupted too.
Finally, you should run the following commands.
Exchange 4.0 and 5.0
------------
ISINTEG –fix –pri
ISINTEG –fix –pub
ISINTEG –patch
Exchange 5.5
------------
ISINTEG –fix –pri –test alltests
ISINTEG –fix -pub -test alltests
ISINTEG –patch.
5 Scenario: “Moving Exchange to another machine”
5.1 General information
In this scenario, the moving of Exchange 5.5 to another machine or hardware will be discussed. In the previous chapters, the restoring of Exchange to the same machine was discussed. There was no need to reinstall Exchange at that point. In this chapter, a full reinstall will be discussed. After the reinstall has been completed successfully, a full restore of the (old) Exchange databases to this newly installed machine will have to be performed. Note that there are some pre-installation requirements.
5.1.1 Pre-installation requirements
Before installing Exchange to another machine, the administrator has to make sure that he knows the original install of Exchange. It is really important that the administrator documented the settings. During install of the new Exchange Server, the administrator must type in the original directory name of the Organization and Site name. This is really important. If the administrator makes a typing error, there is no way to reinstall the original Exchange databases to the newly installed Exchange Server.
To make sure that the administrator knows the original directory name of the Organization/Site name, he will have to follow the following steps:
1. Start up Exchange Administrator program.
2. Point to the Organization name.
3. Point to the File menu and point to the Properties.
4. Document the directory name of the Organization name.
5. Point to the Site name.
6. Point to the File menu and point to the Properties.
7. Document the directory name of the Site name.
Best practice in this case is that you also document the other settings of Exchange, such as the several settings of the Internet Mail Service. Any other settings, the administrator specifically configured for this Exchange environment, will not be discussed in this document.
5.1.2 Reinstall Exchange, SAM database and directory store
In this scenario the reinstall of Exchange will take place on a different machine. Meaning: the newly installed NT machine does not contain the original users. The original SAM databases had been replaced. The thing is that the directory store cannot be restored.
In this scenario, the directory store will not be restored. Only the information store will be restored to the newly installed Exchange server box.
5.2 The procedure itself
After that the administrator has performed a full reinstall of NT, created the users and reinstalled Exchange with the latest service packs, the restore will have to be done.
NOTE: during the install of the new Exchange server, the setup program will ask for the name of the Organization and Site name to be created. The administrator must use the original Organization and Site name that he documented earlier. That is really important. Otherwise, he will have start up all over again.
NOTE: do not run the Exchange Optimizer after the install of the Exchange Server box.
The procedure will look like the following:
1. Stop the Exchange Server services from Control Panel/Services on the newly installed Exchange Server.
2. Clear all the files in the \\MDBDATA folder.
3. Copy the priv.edb and pub.edb to the \\MDBDATA folder you previously cleared. If you restore from tape backup, you restore the Information Store. Not the directory store or dir.edb.
NOTE: it is possible to restore the directory store. To do so, there is a tool on the market that will do that job. However, this will not be discussed in this document. For your information, the tool is called DSAMAIN.EXE.
4. Start up System Attendant/Message Transfer Agent/Directory Store from Control Panel/Services.
5. Run isinteg –patch from the command prompt.
6. Start up the rest of the services.
NOTE: If the Information Store does not start up, there might be an issue that you will have to delete
the \"Restore In Progress Key\" from the registry. Note the \"Restore In Progress Key\" in the registry and delete this \"Restore In Progress Key\":
HK_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\MSExchangeIS
HK_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\MSExchangeDS
7. Start up the Information Store.
8. Run DS/IS (Start up Exchange Admin program, Site/Configuration/Servers/YourServerName/File Menu/Properties/Advanced button/Consistency Adjuster/Enable four options/All inconstencies).
9. From the Recipients Container in Exchange Admin, you should get the properties of each mailbox and
add the NT Account as the Primary NT Account.
NOTE: the administrator will have to edit each messaging profile to point to the newly installed Exchange Server machine. If the administrator has used the same machine name, there might be a possibility that he will have to edit each messaging profile and that he has to click on the “Check name” feature.