In this article I’ll show you how to pst a exchange 2007 mailbox for backup purposes. First there are a couple of things you need to understand. PST mailboxes is very time consuming, but this is a great way for small organizations to get a brick level backup. I use symantec for my backups, but I always feel like I need another level of protection for the “just in case” of scenario. You can also use the free windows backup utility already in windows also to do backups. For a secondary backup, I do a brick level pst backup and upload to my online backup provider at set intervals. Here’s what I did to get it to work. I used another machine for the backups, as I didn’t want to use additional processing power, and disk i/o on my exchange server.
Prerequisites: Exchange 2007 SP1, Outlook 2003 SP2 (on the backup server), Exchange Management Console and Powershell (on the backup server)
Steps to backing up mailboxes automatically to pst
In the below scenario you don’t need to do anything to your exchange server, this is all done on a backup server (that’s the way I decided to do it, but to each his own).
1. Load Exchange management console on your backup server.
2. Login as administrator (or a backup administrator account if you have one) onto the backup server.
3. Now make sure the administrator has access to all the mailboxes you need to backup. If not go to exchange management console > recipient configuration > mailbox > choose the user. Then click on manage full access permission and make sure the administrator (or backup administrator account is added). Now you may be able to change permissions to a certain level to backup without giving full access, but in this article I just gave the admin account full access to the mailbox.
4. Make sure Outlook 2003 SP2 is loaded on the backup server (this process requires it).
5. Open up exchange powershell, and type in the follow command (for the italics replace it with your organization or server information).
Get-Mailbox -Database “server name\first storage group\mailbox database” | Export-Mailbox -PSTFolderPath d:\pst_backup\
d:\pst_backup was my backup path but you can change to whatever you like.
6. Run the command, and give it a test run (just choose one mailbox for now to pst, just to see if it works).
Now to automate the whole thing.
1. Once you were able to backup one mailbox (from the above command) copy that command somewhere you’ll need it later.
2. Now create two file, pstbackup.cmd, and pstbackup.ps1, and put them in your pst backup folder (doesn’t have to be there).
3. Edit the pstbackup.ps1 file and put the following (same as the earlier command except with the -confirm:$false).
Get-Mailbox -Database “servername\first storage group\mailbox database” | Export-Mailbox -PSTFolderPath d:\pst_backup\ -confirm:$false
4. Save it, and let’s edit the pstbackup.cmd file now. Put in the following command.
powershell -PSConsoleFile “d:\Program Files\exchange\bin\exshell.psc1” -command “d:\pst_backup\pstbackup.ps1” > d:\pst_backup\pstbackup-log.txt
Now your path for the exshell.psc1 may be different so search your server for the exact path of that file.
The pstbackup-log.txt file will generate a log (you can put it wherever you like).
5. Now run the pstbackup.cmd file, and it should starting psting the mailboxes (it only does 4 at a time).
6. Schedule the pstbackup.cmd in your scheduled tasks for your backup, and that’s it.
If you get errors in your log make sure that that the administrator or the logged in user of the backup server has full permissions to the mailbox. I’ve also provided my files that I used in the download section of this website in case you need a reference.
Download the exchange 2007 pstbackup files
2 Responses
Leave a Reply
In our company we got rid of PST files at all. There were always very hard to archive.
Some time ago we implemented archive manager http://www.scriptlogic.com/products/archive-manager that was able to solve the problem.
This solution captures all incoming/outgoing email traffic to a central compressed database saving a lot of diskspace and providing easy access to all messages.
With this tool we were able to import old PST files to the database as well.
There is always a need for PST file. PST file contains just not the Emails but Contacts, Tasks, Calander, Notes etc. I found it a sure way to recover Mailbox if your Exchange Server crashed.