Steps for taking Backup of an Exchange database offline:
Before starting the process, you must know some basic information. Always determine that whether the circular logging is enabled, not for the storage group as it is disabled by default. To check, in Exchange System Manager, open the properties of the storage_group object and view the General page. If you want to disable it, click to clear the Circular Logging check box. Any changes in circular logging do not affect until you stop each database, which is present in the storage group. For offline backups, you do not need to disable circular logging, but you have to disable it, in case you want to replay transaction logs into restored offline backups.
Database Files Relation with each other:
The .edb and .stm files are final archives of the database information. In most of the cases, these two files are used as a single file, and backup restores these files in an order. These files must be synchronized in a proper sequence with each other, as an .edb file, which is backed up on a day, cannot be matched with a .stm file.
Backing Up an Exchange Database Offline
- To start backup, select only the data, which you want to backup, do not choose the whole storage group.
- Check the database files (.edb and .stm file) whether they are matched with each other. To check, run the below mentioned command against each file:
eseutil /mh database file | find /i “DB Signature”
Always remember that Exchange SP 2 or later versions run the following additional command to determine the state of each database:
eseutil /mh database_name | find /i “Shutdown”
With the match of database signature, the file must also be synchronized and consistent with each other. Run the below mentioned command against each file:
eseutil /mh database file | find /iRun the following Esefile utility command, to verify the page checksums for an Exchange database: “consistent”
In case the file reports show “State: Inconsistent” or log positions are not synchronized, it means that the database was not cleanly dismounted. Repeat the Mount and dismount process.
1. Copy all the .edb files and its corresponding .stm file to a backup location
2. Now mound the backed up database.
3. You can skip this step, in case circular logging is enabled. If Circular logging is disabled and you wish to ‘roll forward’ later, then take a backup of all numbered transactions log files (The E0nxxxxx.log files). Remember; do not take back up of the E0n.log, Res1.log, and Res2.log files.
When log file has been renamed from E0n.log to E0nxxxxx.log, you can backup numbered log file at any time, as Exchange does not change that file again. Though, follow step 6 instructions to take log files backup.
To see the internal log generation number, run the below mentioned command:
eseutil /ml [log file] | find /i “lGeneration”
Always make sure that your log file backups are fine, because it is the surety of fine database backup. As full recovery from any database backup is dependent on to keeps each and every log file after backup.
4. You do not need to follow this step, if circular logging is enabled. To find out the highest numbered log file, that can be safely deleted, examine the header. The checkpoint keep track of lowest numbered log file that is required for automatic recovery in case the database has stopped suddenly. Restoring an Offline Backup of an Exchange Database
5. To examine the checkpoint file run command: eseutil /mk E0n.chk
6. In case circular login is disabled, log files will gather until they are either removed automatically from the online backup process or deleted manually. And, if it is enabled, there is no need of old log file management as database service automatically deletes old log files after the checkpoint passes through them. After your log file backup, you can now remove numbered log files except checkpoint log.
When you have taken backup of all the numbered log files, you can reclaim disk space by removing all the numbered log files up to, but not including, the checkpoint log.
Note: Do not remove the checkpoint log.
7. This step is optional for you, as it is to verify the page-level integrity of the copied databases. To check, you can use Esefile utility, it is available in the support folder on Service Pack 3 CD-ROM, exchange server 5.5, the Exchange 2000 Server installation CD-ROM, or the Exchange Server 2003 installation CD-ROM. The Esefile utility works for Exchange 2000, and Exchange 2003, .edb files from Exchange Server 5.0 and 5.5.
The .stm file contains raw data, and all the pointers and indexes that organize that data, that is in .edb file. Any problem in .stm file can cause data loss of any specific client, but if structural or logical integrity of the database will effect, it will not compromise.
Run the following Esefile utility command, to verify the page checksums for an Exchange database:
esefile /s database_name
8. This step is also an option for you. You can use the below command to verify the integrity of backed up log files:
eseutil /ml E0n
This command is to check the corruption in the log files, as well as gives warning if log files are missing in the middle. And also check the signature that exists in any log files.
Offline Backup Restoration of an Exchange Database
We explain here two methods to restore an offline backup
1. Point in time: In this type, no log file will be displayed into database, and the data created after backup will be lost. Remember that all the stopped database in the storage group must be consistent with a valid checkpoint file. Do not delete the current checkpoint file or any existing log files.
2. Roll forward: In this type, the log files will be played into the database. As all log files are available so you can preserve data, which was created after the backup. Remember that all the databases in the storage group must be stopped and consistent, log files that were created after backup must exist (including the current E0n.log). The checkpoint file must be deleted.
If circular logging is enabled you cannot choose ‘roll forward’ restoration and have to perform ‘point in time’ restoration.
1. Dismount the database, which you want to restore. All the dismounted database and streaming files (.edb and .stm) must be matched and consistent with a valid checkpoint file existence.
Run the flowing commands to verify the checkpoint file when all the databases are stopped:
eseutil /mk E0n.chk | FIND /i “checkpoint”
eseutil /ml E0n.log | FIND /i “lgeneration”
2. Copy .stm and .edb files to the correct streaming and database file locations, and check whether the restoRun the following Esefile utility command, to verify the page checksums for an Exchange database: red files are matched and consistent.
3. Now mount the restored database that attaches itself to the end of the E0n.log file.
Start the Restoration process of an Offline Backup
Things to remember into a restored database for successful replaying log files:
- Keep a copy of all transaction logs of your oldest full backup
- Without making a new complete backup, do not change the data path
- Do not remove or add data storage group without making a full backup of all the databases in the storage group
1. Dismount the database and copy it to the correct paths on the server. If there is any copy of the same database file available in the server, delete them before restart.
2. Dismount the databases available in the storage group, and run the below mentioned command against each database, and against each restored database file:
eseutil /mh database_file_name | find /i “consistent”
3. Make sure that the log signature of each database header must be matched with the low anchor log signature, you can check it by running the following command:
eseutil /mh database_name | find /i “Log Signature”
eseutil /ml low_anchor_log | find /i “Signature”
A log file may be consist with numerous signatures, the first will always be the its original signature. All rest signatures are databases, which were at the running condition when file was created
4. Make sure, that the path of current database path locations must be same as they were at the time of backup To verify you can run the following commands
eseutil /ml “Last_Consistent”_log | find /i “database name or pattern”
5. Collect all the logs, from the low anchor number in proper sequence, and copy them to current transaction logs path. Do not overwrite logs, which are already in the place on the server, back them up and then copy. To do this, you have to restore log files from more than one type of backup media.
6. Make sure that all the logs must share the same log signature in a proper sequence. Run the following command:
eseutil /ml E0n > filename.txt
7. In case the high anchor log is not named E0n.log, rename it
8. Delete the file E0n.chk from the System Path folder
9. Verify the following things before you mount the storage group
- All DB files are available in their running path
- Running log files must be those files, which start from low anchor log and continue at least to the high anchor log. The higher available log name must be E0n.log.
- There must be no E0n.chk file present in the System Path folder.
11. In case the information saved in not running, start it, and mount at least one database in the storage group. This allows soft recovery to run against the entire database present in the storage group.
In case your backup file is corrupt and you are unable to restore it, you can use some professional tools to repair your corrupt Exchange bkf file. These tools are specially designed to repair corrupt backup files and to recover the important exchange data from the files. As these software provides a very easy user interface and are designed for every user and one can easily recover his backup files from them. You just need to download and install the software, and follow the given steps to recover all the backup files with fast algorithms.
Short URL: http://ttw.tips/2bsC9GR