A recent project I worked on involved the simultaneous upgrade and expansion of the messaging environment from a single Exchange Server 2003 server to multiple Exchange Server 2007 servers.

In the new topology there were to be two Exchange 2007 mailbox servers, one at each of the two main sites.  This required that a Public Folder database be deployed at each site which would then be replicated with one another.

Migrating the content from a single Public Folder database to multiple databases was achieved with just a few simple steps.

How to Migrate Public Folders from Exchange 2003 to Exchange 2007

First migrate the public folders from Exchange 2003 to Exchange 2007.  I posted the step by step process here.

Next we simply enable the second server as a replica for all of the public folders themselves.  Microsoft provides a script with Exchange 2007 that can do this.  The script is located in the scripts folder of your Exchange Server install path, eg C:Program FilesMicrosoftExchange ServerScripts.

In this example there are two available PF databases.

[PS] C:\>Get-PublicFolderDatabase

Name                           Server               StorageGroup
----                           ------               ------------
Public Folders (server1)       SERVER1              SG02
Public Folders (server2)       SERVER2              SG02

A look at one of the public folders shows only SERVER1 as containing a replica.

[PS] C:\>Get-PublicFolder "Sales Contacts" | fl replicas

Replicas : {SERVER1SG02Public Folders (server1)}

Using the script we can add SERVER2 as a replica for all of the public folders.

[PS] C:> .AddReplicaToPFRecursive.ps1 -Server "SERVER1" -TopPublicFolder "" -ServerToAdd "SERVER2"

Note that specifying the top public folder of will generate an error, because that folder cannot be modified in this way, however the script will then continue down the public folder tree and modify all of the other public folders.

Depending on how complex your public folder tree is this might take some time.

After is has finished the public folder replication schedule for your PF databases will replicate the content between the two servers. Again this might take some time, and in this example SERVER2 will not show any content until it is replicated for each folder. With that in mind, you should perform this task outside of business hours, or stage it by adding the replica to one main folder at a time instead of the entire tree at once.

Also be aware that this initial replication can generate a lot of transaction logging, so you either need to ensure a lot of logging disk space is available, run regular backups to truncate the logs, or use circular logging temporarily.

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Leave a Reply