Wednesday, October 1, 2008

Recovering Messaging Databases


Methods for recovering a database:

- Recover using Recovery Storage Group (RSG)
- Recover using Database Portability
- Recover using Dial-Tone Recovery

Recover data using RSG:

1. Use Exchange Database Recovery Management tool for creatingthe RSG.
2. Restore data using back to the RSG (Note: You don’t need to select an RSG to restore to.. If one exists, it is automatically used.)

Recover using Database Portability:
You can use the database portability feature in Exchange Server 2007 to recover a mailbox database when there is a server failure or a hard disk failure.

You can use this option when a Mailbox server fails, but the storage group and database files are available on hard disk or on a backup tape.

You can also implement database portability when the hard disk storing the database fails on one server, and the hard disk cannot be replaced. You can restore the database from the backup data on another Mailbox server.

By using database portability in Exchange Server 2007, you can move a mailbox database from one Mailbox server and mount it on another server. To mount the database on the new server, you do not need to modify the database or configure the server. However, you can mount the database only on a server in the same Exchange Server organization.

To recover a messaging database by using database portability:

1. First create a new database on an alternate server. The new database must have the same name as the database you are recovering. You can either create a new storage group or create the destination database in an existing storage group on the server. Then, configure the database so that you can overwrite it with the backup data.

2. You can now restore the backup copy of the database from the failed server and mount the database on the new server.

3. Finally, you need to modify the user accounts to refer to the new database by using an Exchange Management Shell command.
This command obtains a list of all mailboxes in the restored database and passes it to the Move-Mailbox cmdlet.

Get-MailboxStatistics -database Move-Mailbox -configurationOnly -target

4. When users try to access their mailboxes by using Microsoft Office Outlook 2007, they will be automatically redirected to the new server. However, you need to manually configure clients such as Microsoft Office Outlook 2003 and earlier versions to refer to the new Mailbox server. Outlook Web Access users are also automatically redirected to the new server.

Recover using Dial-Tone:
You can use dial-tone recovery to provide users with immediate access to their mailboxes and e-mail services even before you restore data to their mailboxes. To do this, create an empty mailbox database to replace the missing or corrupted mailbox database. By using dial-tone recovery, you can ensure that users experience minimum disruption of services after the failure of a database or a server.
Benefits of Using Dial-Tone Recovery
By implementing dial-tone recovery, you can ensure that users in your organization can access their e-mail messages and begin working much faster compared to a standard restore. When you perform a standard restore, users cannot access e-mail services until you restore the database completely. A standard restore can take several hours if the database is very large, and external users may start receiving non-delivery reports (NDRs).
Using Alternate Servers
If there is a server failure instead of a database failure, you can perform dial-tone recovery on an alternate server by using the database portability features of Exchange Server 2007. You also need to modify the user accounts to refer to the new database location.
Recovering Historical Data
After dial-tone recovery is complete, you can restore the data from backup to an RSG and then merge the mailbox contents in the recovered database with the contents in the dial-tone database. All the user mailboxes will now have all of their historical information as well as the received and sent messages since the implementation of dial-tone recovery

Procedure:

  1. On another server create a new Storage Group and Create new Database.Note: Use the SAME NAME as the database you'll recover.
  2. Open Exchange Mgmt Shell and modify the user accounts to refer to the new database by using an Exchange Management Shell command.
  3. This command obtains a list of all mailboxes in the restored database and passes it to the Move-Mailbox cmdlet.Get-MailboxStatistics -database
    Move-Mailbox -configurationOnly -target
  4. This will give the users access to their mailboxes, while you prepare to merge backup data from and RSG to the new mailbox database.
  5. Use the Exchange Database Recovery Management tool to create a RSG and restore data to the RSG (Refer to Recover using RSG prior section).
  6. After db is restored from backup, use Exchange Database Recovery Management tool to merge data from RSG to the new database.
  7. Manage Recovery Storage Group > Merge copy mailbox contents > Gather Merge Information
  8. At the Select Merge Options > Perform pre-merge tasks
  9. Select mailboxes to copy or merge and Perform Merge Actions

Exchange 2007 - Upgrading Email Policies

Upgrading Email Address Policies (EAP)

If Exchange 2007 organization resides with  legacy instances of Exchange 2000/2003. The deployment of Exchange 2007 within the same organization results in a coexistence with legacy Exchange and Exchange 2007. As with any coexistence/migration scenario, steps should be taken to convert/move legacy born objects to native Exchange 2007 objects. This section will talk about the steps you can take to upgrade your legacy LDAP filters for EAPs to the new syntax, allowing you to upgrade your Address List and Email Address Policy objects to the Exchange 2007 object version. Exchange 2007 uses a new style of filter syntax to replace the LDAP filters of previous versions.

Note: that if you decide not to upgrade the ALs or EAPs, there will be no broken functionality from the Exchange 2007 side. New users will still be provisioned according to those policies. However you will not be able to edit those objects from 2007 Exchange Management Console until they are upgraded.

To confirm the need to upgrade the filter (and the version) on your EAP. There are a couple of key indicators you can check. The first is that if you try to edit the EAP in Exchange 2007 GUI, you'll get a screen with this error - "Unable to edit the specified E-mail address policy. E-mail address policies created with legacy versions of Exchange must be upgraded using the 'Set-EmailAddressPolicy' task, with the Exchange 2007 Recipient Filter specified.":

Another way to check that doesn't rely on the GUI is to issue this one-liner:

Get-EmailAddressPolicy | Format-List Name,*RecipientFilter*,ExchangeVersion

This cmdlet will return all of your EAPs, and will include any properties containing RecipientFilter and the ExchangeVersion property. Look for these clues:

· LdapRecipientFilter is populated but RecipientFilter is empty - Exchange 2003 doesn't populate RecipientFilter; that's what we're about to do!

· RecipientFilterType is "Legacy"

· ExchangeVersion is "0.0 (6.5.6500.0)"

<Company> Email Address Policy Results (Pre-EAP Upgrade) –

· Sample One legacy (Exchange 2003) and One Native (Exchange 2007)

Legacy Sample

Name : Default Policy
RecipientFilter :
LdapRecipientFilter : (mailnickname=*)
LastUpdatedRecipientFilter :
RecipientFilterApplied : False
RecipientFilterType : Legacy
ExchangeVersion : 0.0 (6.5.6500.0)

Native Exchange 2007 Sample

Name : company
RecipientFilter : (CustomAttribute1 -eq 'company.com' -and Alias -ne $null)
LdapRecipientFilter : (&(extensionAttribute1=company.com)(mailNickname=*))
LastUpdatedRecipientFilter : (CustomAttribute1 -eq 'company.com' -and Alias -ne $null)
RecipientFilterApplied : True
RecipientFilterType : Precanned
ExchangeVersion : 0.1 (8.0.535.0)

 

Upgrading Default EAPs

Note: Once these changes are made, you can no longer manage the email policies within the Exchange 2003 System Manager.


IMPORTANT
: This process is only for “Default” email policies. Upgrading Custom Email Policies.

Since the "Default Policy" EAP has a well-known filter, we can simply provide the Exchange 2007 equivalent of this well-known filter to do the upgrade. Here's the one-liner:

Set-EmailAddressPolicy "Default Policy" -IncludedRecipients AllRecipients

When you run this one-liner, you'll be prompted to ask whether you REALLY want to do the upgrade with this text: "To save changes on object "Default Policy", the object must be upgraded to the current Exchange version. After the upgrade, this object cannot be managed by a previous version of Exchange System Manager. Do you want to continue to upgrade and save the object?"

Once you've committed to a "Y" answer on this confirmation, the "Default Policy" EAP will be upgraded to Exchange 2007 version with the new Exchange 2007 filter in place. You can confirm this by looking at the same properties as before. Now you'll notice that there is a RecipientFilter property populated, that the RecipientFilterType is "Precanned", and that the Exchange version has bumped to 0.1 (8.0.535.0). Further, you may notice that you can no longer make changes to the recipient policy through Exchange 2003 ESM, although the Exchange 2003 Recipient Update Service (RUS) will continue to process these recipient policies just fine.

Upgrading Custom EAPs

What if you've created some special EAP or AL objects for your organization, over and above the built-in set of EAP and AL objects? How can you convert the "not-so-well-known" LDAP filter you have created into an equivalent OPATH filter for use by PowerShell?

Upgrading Custome EAPs is not as simple as upgrading Default Policies. There is more to than simply running a command.

http://msexchangeteam.com/archive/2007/01/11/432158.aspx

Script - Create New FreeBusy Connector

The following script can be used to create a new Transporter Suite Free/Busy Connector.  This can be for a new connector on an Existing Exchange Server or a new Connector on another Exchange Server.  Modify the code accordingly.

#Create a new Domino Free Busy Connector

# Transporter Commmand Parameters (New-DominoFreeBusyConnector)
#        -Name: Connector name#       
#        -DominoServer: Identifies the Lotus Domino server running the excalcon.exe task.
#        -DomainoSMTPDomains: Specifies the Domino SMTP domains that the Exchange transporter Domino Free/Busy Connector monitors for free/busy requests.
#        -NotesINIFile: Path to the Lotus Notes.ini file, including filename.
#        -RefreshIntervalSeconds: Number of seconds free/busy information will be retained for a previously requested user. The default is 900 seconds
#        -NotesPassword : The password associated with the local Lotus Notes ID file.
#        -MaintenanceIntervalMinutes : Determines how often the connector should verify that the Lotus Notes users are listed in the free/busy public folders.
#        -QueryWindowDays :Defines how many days of free/busy information to retrieve. The default is 60 days

#        -RequestTimeOutSeconds : Specifies how long to retry accessing a server before returning an error.The default is 15 seconds

Write-Host
Write-Host
Write-Host "C R E A T E N E W F R E E / B U S Y C O N N E C T O R"
Write-Host

$Password=Read-Host "Enter Notes Password: " -AsSecureString

#DELETE EXISTING CONNECTOR PRODUCTION
Remove-DominoFreeBusyConnector -identity '<ExchServerHostingTransporterSuite>-DominoFreeBusyConnector' -Confirm:$False

#NEW FREE BUSY CONNECTOR PRODUCTION
New-DominoFreeBusyConnector -Name '<ExchServerHostingTransporterSuite Domino Free Busy Connector' -NotesPassword $Password -DominoServer '<DominoServerHostingEXCALCON/DOMINO DOMAIN-ConnectedDomains 'company.com; exchange.company.com;' -NotesINIFIle 'D:\lotus\notes\notes.ini' -RefreshIntervalSeconds '300'

#START FREE BUSY CONNECTOR
Start-DominoFreeBusyConnector

#START SYNCHRONIZE ENTRIES
Start-DominoFreeBusyConnector -synchronizeEntries $True

Domino to Exchange 2007 Migration Tool Comparison

 

Domino/Notes to Exchange/Outlook migration tool set comparisons:

 ** Note:  These are Data Migration Tool Comparisons.  Not Coexistence features.

Migration Capability

Detail

MS Transporter

CMT - Universal Binary Tree

Quest - Notes Migrator

Mail

Will it move mail?

Y

Y

Y

Encrypted Mail

Will it decrypt mail?

N

Y

Y

Archived Local

Will it import archives from local client?

Y

Y

Archived Server

Will it import server based archives?

Y

Y

Y

To-Do

Will it migrate To Do Lists to Tasks?

Y

Y

Y

Keep-To-Do-Assignments

Will it keep all the information?

N

Y

N

Doc Links

Are they converted?

Y

Y

Y

Excluded hidden folders- custom

Will it migrated user private folders?

N

Y

Y

Personal Address Book

Will it do local names.nsf to contacts?

Y

Y

Y

Personal DL and Membership

Will it translate these names.nsf to contacts?

Y

Y

Y

Server Groups

Can it migrate server groups?

Y

Y

Mail InDB

Can it migrate Mail-in databases?

N

Y

Y

Document Library

Can it migrate document libraries?

Y

Y

N

Discussion Library

Can it migrate Discussion libraries?

Y

Y

N

iNotes Contacts

Will it migrate iNotes contacts to Outlook contacts?

N

Y

Y

Filter Mail

Filter mail based on date?

Y

Y

Y

Filter Attachment

Filter based on size?

*

Y

Y

Filter Calendar

Filter calendar based on date?

*

Y

Y

Filter To-Do

Filter based on date?

*

Y

Y

Powershell

Does it interface with Powershell?

Y

N

Y

Migrate to PST

Will it migrate mail directly to a PST?

N

Y

Y

PST Contains Calendar

Will it migrate calendar directly to PST?

N

Y

Y

PST Contains Tasks

Will it migrate tasks directly to PST?

N

Y

Y

PST Contains Contacts

Will it migrate Contacts directly to PST?

N

Y

Y

Custom Address Mapping

Custom address translation during migration of data?

N

Y

Y

Rules

Will it move Notes client rules to Outlook Rules?

N

Y

N

Rooms/Resources

N

Y

Y

Custom Reoccurring Meeting

Will it migrate rooms and resources to Exchange?

N

Y

Y

Pre-Processing

Do you have any pre-processing setup options?

*

Y

Y

Post-Processing

Do you have any Post-Processing setup options?

*

Y

Y

Domino Directory Manipulation

Does it change the Domino directory?

*

Y

Y

Batch Mode

Can it be  batched?

*

Y

Y

Config Files Required

Does it require a config file for batch migrations?

*

N

Y

Migrate All Document Views

Does it migrate documents not in any folder?

N

Y

Y

Users Created Required ?

Does it require mailbox to exist?

N

Y

Y

Merge Contact to User

Does it do AD manipulation?

Y

N

Y

Mail Enabled users required?

Does it do AD manipulation?

N

Y

Y

Mailboxes Created required?

Does it do AD manipulation?

N

Y

N

Reporting

Are reports available?

N

Y

N

End-User Option

Can an end user DITY?

N

Y

N

Purge mail mode

If you have to restart the migration can you  purge mail first?

Y

Y

N

Merge Mail mode

If you have to restart the migration can you  merge the information without remigrating?

Y

Y

N

Maximum Threads

Can thread count be modified to increase performance?

16

Y

32

Skip Empty Folder option

Can you skip empty folders?

Y

Pre Migration Customizable AD Scripts

Do you provide  free scripts to enhance the process?

Y

Post Migration Customizable AD Scripts

Do you provide  free scripts to enhance the process?

Y

Reschedule Meetings Post Migration

Can you reschedule a meeting successfully POST Migration?

Y