Flush Transaction Logs in Exchange: Eseutil /MH Database - Edb
Flush Transaction Logs in Exchange: Eseutil /MH Database - Edb
Flush Transaction Logs in Exchange: Eseutil /MH Database - Edb
If all the databases are in a Clean Shutdown or Consistent state, you may remove all the
transaction logs. Older versions say "Consistent", New Versions of Exchange say "Clean
Shutdown". In my screenshot I'm using Exchange 2010.
Note: If it is not in a "Clean Shutdown" or "Consistent" state, you can use eseutil to reply
the log files into the database or remount the database and allow Exchange to replay them.
Caution: Do not delete log files if the state is not "Clean Shutdown" or "Consistent" as you
will loose email!
3. Delete all log files including the chk file. The checkpoint file keeps track of which log files
have been and have not been played into the database. Since there are no log files anymore, the
checkpoint is not needed.
Caution: If your database is in the same directory as your log files be careful you dont
accidently delete your edb database file as well!
4. Re-mount your exchange databases in your storage group. This will automatically create a
new checkpoint file ready to go!
The proper way to clear your log files is to take a full backup och the Exchange database or
to enable circular logging. But, you can also use the following method to clear the logs.
Dismount the databases, verify the databases are showing "Clean shutdown". Then
run ESEUTIL /MH on them and after that you can delete all the tran logs, restart the the
MSExchangeIS service and mount the databases.
Have a look here for a more detailed description:
http://clintboessen.blogspot.com/2010/09/flush-transaction-logs-in-exchange.html
http://support.microsoft.com/kb/240145
And yes, you should also delete the chk files.
4. End Backup
3. At this step you should notice the following events in the application log indicating that
the backup was indeed successful and logs will now be deleted.
Heres some screenshots from the process:
You can run these scripts remotely from another server with the Exchange tools installed and
specify the DAG member using the serverName parameter. Just make sure that the server you are
running the scripts from has the Windows Failover Cluster Management tools installed.
3. Run RedistributeActiveDatabases.ps1 script to re-balance the active database copies
across the DAG
Finally, you can run this script to redistribute the active mailbox databases across the DAG.
There are two options for balancing active database copies within a DAG: by activation
preference and by site and activation preference.
When using the BalanceDbsByActivationPreference parameter the script tries to move the
databases to their most preferred copy based on activation preference, regardless of the AD site.
If you use the BalanceDbsBySiteAndActivationPreference parameter, the script will attempt to
active the most preferred copy and also try to balance them within each AD site.
There are a number of parameters that can be used with this script. Run get-help
.\RedistributeActiveDatabases.ps1 for more details. Also, all of these scripts are documented in
Managing Mailbox Database Copies and Managing Database Availability Groups on TechNet.
Fortunately, there is a setting that can be changed to allow you to perform successful backups
when a volume contains both active and passive databases. This is accomplished by disabling the
Exchange Replication Writer via the registry, forcing the Store Writer to be used instead. This
will ensure that you can get a good backup of the active database and the passive database will
be ignored. To enable this setting, perform the following steps:
1. Navigate to
HKEY_LOCAL_MACHINE\Software\Microsoft\ExchangeServer\v14\Replay\Parameters
2. Add a new DWORD value named EnableVSSWriter, and set its value to 0, as shown below:
3. Exit Registry Editor and then restart the Microsoft Exchange Replication service.
At this point, you can run your backup job on the volume that contains the active and passive
Exchange databases. Once completed, the status should indicate that the job finished successfully
and an Event ID 9827 will be written to the application log:
Backups are done at the volume level to perform a successful Exchange backup, you
have to backup the entire volume containing the databases and logs.
o
No remote backups you have to run WSB locally on the server you are backing up.
o
Only active DAG databases are supported you cannot backup volumes containing
passive copies of databases.
In this post well go over installing WSB on a Windows Server 2008 R2 server, and configuring
WSB to backup active Exchange databases in a DAG.
o
Then we can add the backup feature using the Add-WindowsFeature Backup command:
Note: Only install the Backup feature, do not install the WSB command-line tools.
Performing a Backup
Start WSB, in the select Backup Once in the Action menu:
In this example, my Exchange database and logs are stored on the E:\ drive. I am going to select
only the E:\ drive and click Ok.
On the Specify Destination Type screen, I am going to choose Local drives because I have
another local dedicated disk for storing backups. You can use a remote file share, if needed:
We can check the properties of the database in EMC to confirm that the database shows the Last
full backup date:
You can also check this value in the Exchange Management Shell using the following command:
Get-MailboxDatabase DAGDB1 -Status | select LastFullBackup
As you can see, it is a pretty simple process to backup Exchange databases using WSB. In an
upcoming post, Ill go over how to restore a database from a backup.
Related Posts
Windows Server Backup with Volumes that Include Active and Passive Exchange
Databases (1)
Restoring Mailbox Data from a Recovery Database in Exchange 2010 SP1 (62)