How to copy Online Archive data back into the mailbox

/

Here are some field notes from a recent Exchange 2010 Retention and Archive case. We had to get data back from the Online Archive and back into the users mailbox, to it’s original location.

There are several ways of getting data back from an Exchange Online Archiving into the Mailbox of the user. One way is having the user copy the data back manually from his/her archive into their inbox using drag and drop.

Another way, which is described in this post – is to do it centrally on the Exchange 2010 Server using the New-MailboxExportRequest and New-MailboxImportRequest PowerShell commands.

To get statistics about the Archive content, see my blog post: Exchange 2010 Archive Mailbox Statistics PowerShell script.

Permissions to use the cmdlets

Make sure you have the permissions to run the Export and Import cmdlets.

Run the Exchange Management Shell elevated as Administrator

If your account does not have permissions to run the New-MailboxExportRequest and New-MailboxImportRequest cmdlets, then run the follow RBAC command:

New-ManagementRoleAssignment -Role "Mailbox Import Export" –User DomainAdminAccount

 

Export the archive to a PST file

The mailbox used in the example below is “IT”.

Run the following cmdlet to Export the Online Archive of the mailbox IT to a PST file located on a fileshare:

New-MailboxExportRequest –Mailbox IT  -IsArchive -FilePath filesharePSTITarchive.pst

It is important to remember the parameter “-IsArchvie” which states that it is the online archive of the IT mailbox that gets exported.

Check status of the Export using the cmdlet:

Get-MailboxExportRequest

 

 

Import the exported PST file into the mailbox

The mailbox used in the example below is still “IT”.

Run the following cmdlet to Import the PST file (containing the Online Archive) into the IT mailbox and to the original location of the content:

New-MailboxImportRequest -Mailbox IT -FilePath filesharePSTITarchive.pst

If you want to import the content of the PST file into e.g. a specific folder within the mailbox, use this command instead:

New-MailboxImportRequest -Mailbox IT -FilePath filesharePSTITarchive.pst -TargetRootFolder "RecoveredFiles"

Check status of the Export using the cmdlet:

Get-MailboxImportRequest

 

Reference information about using Export and Import cmdlets

Here is some reference information about using those cmdlets below:

6 thoughts on “How to copy Online Archive data back into the mailbox”

  1. Hi Peter,

    This is not possible, We have mailboxes on On-Prem and archive mailbox on O365, Please i was not able to export the pst using “IsArchive” command. Please let us know how do i do it.??

    I guess its not possible.

  2. Hi Peter,
    Excellent article on this, but there is a catch that I found…

    Using Outlook client, if an end-user does a Ctrl+A and try to move all the emails back into the main mailbox from online archive, the operation fails with an error “Items cannot be found as they may have been already moved or deleted” I am guessing that this fails due to the fact that Online Archive is indeed online folder and data is not completely downloaded to the client.

    Using Outlook on web for O365, there is no option for us to do a “Select All” and move all emails at one shot. This is possibly to move what is manually selected or a “select all that is displayed” mode. This is a tedious procedure if one wants to move thousands of emails from online archive to the main mailbox.

    Please suggest if there is a workaround or if there is any easier way to achieve this.

    • Hi, there is no easy way of doing that. If you have a hybrid, you could move the mailbox back to on-premise and use the Export/Import cmdlets, which is available on-prem.

  3. Hi,

    I used the import\export requests and imported the PST into a new folder. after checking the size of the folder using Get-MailboxFolderStatistics it was different than the size of the PST!

    I checked the import request status and it was Completed.

    Any clues ?

  4. Hi, I am using Office 365/Exchange Online and the cmdlet you mention New-MailboxExportRequest is not found. I wonder if I am missing something or if I am not importing the proper module.

Comments are closed.