Exchange 2003 Single E-mail/Mailbox Restore: From an image

Transcription

Exchange 2003 Single E-mail/Mailbox Restore: From an image
Exchange 2003 Single E-mail/Mailbox Restore:
From an image-level backup
Written By:
Ricky El-Qasem
Senior Systems Engineer
Veeam Software
Contents
EXECUTIVE SUMMARY ....................................................................................................................... 3
ASSUMPTIONS................................................................................................................................... 3
EXCHANGE 2003 RECOVERY STORAGE GROUP................................................................................... 4
How a Recovery Storage Group Is Different from a Regular Storage Group .................................... 4
Creating a Exchange Recovery Storage Group ................................................................................ 5
DATABASE EXTRACTION .................................................................................................................... 8
TESTING .......................................................................................................................................... 14
DATABASE CONSISTENCY................................................................................................................. 14
TEMPORARY RECOVERY STORAGE GROUP....................................................................................... 15
RESTORING THE DATABASE FROM BACKUP ..................................................................................... 19
EXMERGE ........................................................................................................................................ 21
ABOUT VEEAM ................................................................................................................................ 28
2|P a ge
EXECUTIVE SUMMARY
As more organisations move to virtualisation to facilitate core infrastructure, they look to the ecosystem vendors to provide necessary core services, such as backup. Who better to help them meet
those requirements than the virtualisation vendors themselves?
VMware enhanced the ability to take offline snapshots for the backup of virtual machines with the
advent of VCB (VMware Consolidated Backup). VCB is a framework that allows third-party vendors
to make use of API calls to produce LAN-free consistent snapshots of virtual machines. This is
achieved by providing a block list to the VCB framework allowing for access of the virtual machine’s
disk subsystem. The block list is presented across a Storage Area Network (SAN)/ Network Attached
Storage (NAS), Fibre channel, ISCSI or NAS, allowing backup I/O to occur away from the production
LAN orientated traffic. The result of these API calls is an agentless live image-level copy of the virtual
disks, or an agentless file-level mount of the virtual disks. What VCB doesn’t do, however, is produce
a brick-level backup of your Active Directory, SQL Server or Exchange Server. Brick-level refers to the
ability of the administrator to choose the smallest component of the backup to restore. In the case
of Exchange Server, that smallest unit is a single e-mail within a mailbox within a mail store. Without
this capability, at the point of restore, instead of using what is available from a VCB snapshot, the
administrator would have to restore the whole server. The way around this traditionally would have
been to use an agent-style backup tool which has the ability to back up at the smallest component,
in this case a single e-mail. This is an imperfect solution, however, as it could be frustrating for
administrators managing two environments; virtualisation and Exchange, as it means purchasing two
different backup solutions.
But all is not lost; Microsoft has established a best practice on how to retrieve a single e-mail or
mailbox from an Exchange 2003 mailbox store without agent technology. This document outlines
how this is achieved in a virtual environment, and even though the backup product used in this
example is Veeam Backup, this document could apply to any VCB image-level snapshot of an
Exchange mailbox store.
ASSUMPTIONS
To find this information useful it is assumed you meet the following prerequisites:



You are conversant with Exchange 2003 and the eseutil command
You are happy with the concept of server virtualisation
You understand the workings of the VCB framework
3|P a ge
EXCHANGE 2003 RECOVERY STORAGE GROUP
A Recovery Storage Group can be mounted as a second copy of an Exchange mailbox store
(database) on the same computer as the original mailbox store, or on any other Exchange computer
that is in the same administrative group. You can then use the Recovery Storage Group feature to
recover e-mail/mailbox data without having to install and to configure a separate Exchange recovery
computer.
The concept we will employ in this solution is to extract the backed-up mailbox store as a flat file,
filename.edb, and present it to Exchange as a Recovery Storage Group database.
Using Veeam Backup we can instantly extract this file from a full image-level backup without
decompressing the image of the snapshot.
How a Recovery Storage Group Is Different from a Regular Storage Group
A Recovery Storage Group is a specialized storage group that can exist with regular storage groups.
Although a Recovery Storage Group is similar to a regular storage group, Recovery Storage Groups
differ from regular storage groups in the following ways:

All protocols except MAPI are disabled. This means that you cannot send mail to or
receive mail from a mailbox store that is in a Recovery Storage Group. However, you can
use the Exmerge.exe tool to access mailboxes to recover data.

You cannot connect user mailboxes in a Recovery Storage Group to user accounts in
Active Directory. The only supported method that you can use to access mailboxes in a
Recovery Storage Group is by using the Exchange Server 2003 version of the
Exmerge.exe tool.

You cannot apply system and mailbox management policies to a Recovery Storage
Group.

Online maintenance and defragmentation do not run against databases in the Recovery
Storage Group.

You must manually mount databases in the Recovery Storage Group. You cannot
configure the databases to automatically mount in Exchange System Manager.

You cannot change path locations or move data files after a Recovery Storage Group is
created because those actions are not supported. If you want to change the location of
the files in a Recovery Storage Group, you have to delete and then re-create the
Recovery Storage Group.

You can only recover mailbox stores to a Recovery Storage Group. You cannot restore a
public folder store to a Recovery Storage Group because that action is not supported.
The methods that you use to recover a public folder store in Exchange Server 2003 are
the same methods that you use in Exchange 2000 Server.
4|P a ge

You can restore any private mailbox store from any computer that is running Exchange
Server 2003 or Exchange 2000 Service Pack 3 (SP3) or later to a Recovery Storage Group,
if the computer that contains the private mailbox store and the computer that contains
the Recovery Storage Group are both located in the same administrative group.
Note: When you restore a mailbox store to the Recovery Storage Group, the mailbox
store is upgraded to the version of the mailbox store that is currently running on the
computer. This means that you must upgrade the original computer to the version of
Exchange that is running on the computer where the Recovery Storage Group is located
before you can copy the databases back to the original computer. For example, if you
restore a mailbox store from a computer that is running Exchange 2000 Server SP3 to a
Recovery Storage Group that is stored on a computer that is running Exchange Server
2003, you must upgrade the original computer to Exchange Server 2003.
You can use the Exmerge.exe tool to move or to copy mailbox data between servers
regardless of the version of Exchange Server that is running on the computers.

By default, data is restored to the existing Recovery Storage Group on the computer.

If you restore multiple databases to a Recovery Storage Group, all databases that you
add to the Recovery Storage Group must be from the same storage group.

You can only have one Recovery Storage Group on a computer.

You can only have one Recovery Storage Group per two-node cluster, regardless of the
number of Exchange virtual servers that are present. For clusters that contain more than
two nodes, each Exchange virtual server can have its own Recovery Storage Group.

Recovery Storage groups cannot be used to restore Exchange backups that were
performed using third-party software that supports the Volume Shadow Copy Service
(VSS) in Microsoft Windows Server 2003. Recovery Storage Groups can only be used to
restore backups performed by an Exchange-aware backup application. Backup snapshots
that were taken by using VSS can be restored only by using VSS.
Creating an Exchange Recovery Storage Group
In this section we describe the process of creating a Recovery Storage Group. An assumption is
made here: Exchange 2003 Standard only allows you to make use of two mailbox stores:
1. Is the standard mailbox store
2. Is typically used for the Recovery Storage Group, but can also be used for a second standard
mailbox store.
5|P a ge
If the administrator has expanded the use of the second database to facilitate a standard mailbox
store, a Recovery Storage Group will no longer be available for use. This is not a problem with
Exchange 2003 Enterprise.
Step 1: On the Exchange Server open the Exchange System Manager.
Step2: Expand the Servers Node, highlight the Exchange Server, right click and select New Recovery
Storage Group.
6|P a ge
Step3: Choose a folder location for the Recovery Storage Group.
You should end up with a node under the Servers node that’s labeled Recovery Storage Group.
7|P a ge
DATABASE EXTRACTION
In this section, we walk you through how to retrieve the database file required to create the
Recovery Storage Group from a backup of a mailbox store.
If Veeam Backup is your preference (although this idea could apply with other technologies) walk
through the restore wizard to extract files from a backup.
Step 1: On the Veeam Backup Server, open Veeam Backup and click on the Restore Wizard icon.
8|P a ge
Step 2: Select “Restore individual files from a backup file”
Step 3: Select the backup required
9|P a ge
Step 4: Select a point in time restore point.
The files you are probably going to need are priv1.edb and priv1.stm unless you had at some point
changed the filename structure of your mailbox stores.
10 | P a g e
Step 5: Right-click said files and select “copy to”
Step 6: Copy the files to a folder or a network share which is accessible from the Exchange server
later on.
Next step is to copy these files across to the Exchange Server if you haven’t already done that in the
folder created earlier for the Recovery Storage Group.
11 | P a g e
12 | P a g e
Rename them something other than the names they already have.
13 | P a g e
TESTING
To test this process, the easiest thing to do is delete and restore a known e-mail.
DATABASE CONSISTENCY
Depending on how you backed up your exchange server there’s a chance that the database is in a
non-consistent state. Microsoft provides a tool to help stabilize the database before recovery. The
first thing that you may have to do is perform a soft recovery using the > eseutil /r r00 /i
/d"c:\Program Files\Exchsrvr\Recovery Storage Group” command. This needs to be executed from
the Exchange bin folder and pointed at your Recovery Storage Group folder.
In a worst-case scenario, you may have to perform a hard recovery using the >eseutil /p option. It
should be note that with this option there may be minimal data loss and it should only be used when
the soft recovery fails.
14 | P a g e
Now check the consistency of the database using the > eseutil/mh command.
And finally defrag the database using the >eseutil /d option.
TEMPORARY RECOVERY STORAGE GROUP
Before we can start using the database from the backup we have to initialize a temporary that we
can write over later.
Step1: Right-click on the Recovery Storage Group node in Exchange System manager and select
“Add Database to Recover…”
15 | P a g e
Step 2: Right-click on the mailbox store server and choose “Select” from the drop-down menu.
Step 3: On the Database tab create an .edb and .stm file both named Recovery.
16 | P a g e
17 | P a g e
Next mount and then dismount this newly created Recovery Storage Group.
18 | P a g e
RESTORING THE DATABASE FROM BACKUP
The next task in this solution is to restore the original database extracted from the backup over the
top of this newly created temporary recovery storage group. But before we do that, we need to
ensure that it’s possible to write over said database with the backup. To ensure this, in the
properties of the Recovery Storage Group make sure the appropriate check box is selected, then
Click “OK.”
Next step is to delete the Recovery.edb and Recovery.stm file.
19 | P a g e
Then rename the recovered (from backup) mailbox store files with the same name as the justdeleted files Recovery.edb and Recovery.stm.
Now remount the Recovery Storage Group.
20 | P a g e
EXMERGE
Microsoft also provide a tool known as EXMERGE to perform tasks like importing and exporting of
mailbox items to and throw from within a mailbox store. We’ll use EXMERGE to move an item from
the Recovery Storage Group into the live mailbox store.
A key thing to note here is there is a specific version of EXMERGE that relates to the version of
Exchange used. In the example we need the Exchange 2003 version. Download and extract into a
folder. The first time you attempt to execute EXMERGE you will receive the following error:
21 | P a g e
You need to copy the “EXCHMEM.DLL” file from the Exchange bin folder into your EXMERGE folder.
Now attempt to execute EXMERGE.exe again.
22 | P a g e
Select option 1, which performs the recovery task in one pass, making sure you select the option to
delete the PST file after completion.
Specify information about your Exchange server, Domain Controller and the port used for LDAP,
usually port 389. Then click on the “options” button.
23 | P a g e
If you need to restore a single e-mail you have the option to filter all other e-mails by specifying a
string from the subject of the e-mail. Otherwise click OK if you want to restore the whole mailbox.
In this example we have filtered for a subject with the string “test3,” as this is the e-mail we deleted
earlier.
Now select the Recovery Storage Group. This is where EXMERGE will attempt to extract to import
the e-mail/mailbox of interest.
24 | P a g e
Next select the mailbox required.
Specify your locale.
25 | P a g e
Next specify a temporary holding area to extract the mailbox, usually the EXMERGE folder.
Click “Next.”
26 | P a g e
And that’s it, job done, hopefully.
At this point we should have a restored a single e-mail. We could have tested this solution further by
deleting two e-mails but only restoring one, which also works.
For further details on the Exchange Recovery Storage Group, please refer to the following links:


MS knowledge base article 824126 http://support.microsoft.com/kb/824126
MS document “Using Microsoft Exchange Server 2003 Recovery Storage Groups”
http://www.microsoft.com/downloads/details.aspx?FamilyId=DF144AF6-BEE5-4B35-866A557E25FE2BA1&displaylang=en
27 | P a g e
ABOUT VEEAM
Veeam Software, a VMware Technology Alliance Premier Partner, provides innovative software for
managing VMware infrastructure. Veeam offers an award‐winning suite of tools to assist the
VMware administrator, including Veeam Backup, the 2‐in‐1 backup and replication solution; Veeam
Reporter Enterprise, to document virtual environments for capacity planning and chargeback;
Veeam Configurator, offering Host Profiles today; and Veeam Monitor, for performance monitoring
and alerting across multiple VirtualCenters. With its acquisition of nworks, Veeam’s products include
connectors that incorporate VMware data into Microsoft System Center Operations Manager and
HP Software Operations Manager. Learn more about Veeam Software by visiting www.veeam.com.
28 | P a g e