Solved

Backup Mailbox to a PST

Posted on 2015-02-09
5
72 Views
Last Modified: 2015-02-18
hi Experts,

I want to backup online Archive mailbox of a user to a PST using command line. I know the command to backup Mailbox but not the archive mailbox. Can you please help?

Thanks in adavnace
0
Comment
Question by:ukitsme
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:Shane Kahkola
ID: 40600056
Based on your tags, I'm assuming you have an on-premise Exchange 2010 server.

You can pipe the results of get-mailbox to new-mailboxexportrequest, specify the -IsArchive flag, include/exclude folders with -IncludeFolders or -ExcludeFolders, and you can use date stamps with -ContentFilter {received -lt/-gt '01/01/2015'}  Here's an example

If you want to backup all of your users, try this:
Get-Mailbox | new-mailboxexportrequest  -ExcludeFolders #notes# -ContentFilter {Received -lt (get-date).AddDays(-90)} -IsArchive

Open in new window


If it's for one user, try this:
New-MailboxExportRequest -Mailbox Joe.Smith -FilePath '\\server\share\folder' -ExcludeFolders #notes# -ContentFilter {Received -lt (get-date).AddDays(-90)} -IsArchived

Open in new window


You don't have to have the ExcludeFolders parameter, or the ContentFilter parameter.  I put those in for you to see that you can manipulate those options.

For more help, try looking at the Exchange 2010 PowerShell reference at https://technet.microsoft.com/en-us/library/ff607299(v=exchg.141).aspx
0
 
LVL 4

Expert Comment

by:Praveen Kumar Bonala
ID: 40600180
The user performing the export must be a member of a role group which has the Mailbox Import Export role added. The easiest way of achieving this is running this script:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "<user name or alias>"

The location to which you will export the PST file must be a shared folder.

Here is an example of a mailbox export request, which backs up an entire mailbox to a PST file:
New-MailboxExportRequest -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

Limiting the scope of exported contents is possible using additional parameters, e.g.:

-ContentFilter

Specifies what conditions the contents of a mailbox have to match to be exported into the PST file. The conditions are provided in the form of standard PowerShell logical clauses with several item properties available for filtering (wildcards are supported). Example of a script that exports items received prior to 2013-01-01 with subjects beginning with fwd:
New-MailboxExportRequest -Mailbox <user> -ContentFilter {(Received -lt '01/01/2013') -and (Subject -like 'fwd*')} -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

-ExcludeFolders and -IncludeFolders

Just what it sounds like. You can choose from all Exchange mailbox folders. There are also two interesting features available:

The capability to filter personal folders located under root folders using the <FolderName>/* syntax.
The capability to filter well known Exchange mailbox folders regardless of their name in a local language using the #<FolderName>#/* syntax.
Here is an example of a script that exports only the Inbox and Sent Items folders:

New-MailboxExportRequest -IncludeFolders "#Inbox#/*","#SentItems#" -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

-IsArchive

A switch parameter, which defines the archive as the only source of the export. Example:
New-MailboxExportRequest -Mailbox <user> -IsArchive -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst
0
 
LVL 1

Author Comment

by:ukitsme
ID: 40607274
Guys I need backup of Just the archive not the whole mailbox and note that the archive folder is online archive
0
 
LVL 3

Accepted Solution

by:
Shane Kahkola earned 500 total points
ID: 40607776
That's what the  -IsArchive flag is saying.  The box you are backing-up is the archive mailbox for the specified identity, and it will export that to a PST file to whatever share is local to your computer.
0
 
LVL 1

Author Closing Comment

by:ukitsme
ID: 40617883
worked like a charm. Thank you very much greatly appreciate your help
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question