15 Mar Support queries shared: Bulk archiving existing PST files into MailStore
It’s likely that if you’ve been using Outlook to archive your emails, by the time you get to the point where you’re ready to use a dedicated email archiving product such as MailStore, you’ll have a number of PST archive files knocking about, and quite possibly in a variety of locations.
There are a long list of reasons why we recommend against archiving to PST (which you can read all about in another post), but in this article I’m going to focus on what to do if you have gone down that route, and show you how to upload and centralise multiple PST archives in one go rather than one at a time.
MailStore does include a PST archive option to archive existing PST files on a per-file basis. This can be used if you are only working with a handful of files but on larger installations where users may have multiple historic PST file each, using this method to archive potentially 100’s of PST files can quickly become unworkable.
This is where an automated approach is required.
Thankfully the developers at MailStore have addressed this with a simple ‘bulkImportPST.bat’ windows batch file specifically designed to automate the process of importing multiple PST files into a users archive. On its own this is very useful but to auto archive multiple PST files for multiple users we need to do a little more work.
Read on to see how…
Step 1 Setup the template archive PST job within MailStore
Before you can run the batch file you must setup a special Outlook PST File archive job within MailStore as a template that the batch file controls.
Create a new ‘Outlook PST file’ job:
As this is a template it’s unimportant what details to use here so enter a path to a none existent file. (you must enter something to continue)
Click next , then next again until you reach the last page…
This archive job must be called templateBulkImportPST
Do not run the job now just choose ‘Finish’ to save the Job.
You will need the following steps to find your unique pkv3 key
- Now right click on this Job and choose “Create task on…”
- Click the “Copy Cmd Line” button and OK at the prompt then Cancel to close the Create task dialog.
- Next open Notepad and paste the commend to view it.
- Find the reference”–pkv3” and note the value for the pkv3 key, keep this to hand.
Step 2 Download the bultImportPST batch file
The MailStore batch file you will require is called ‘bulkImportPST.bat‘ and further information on how to use it can be found here. The first thing you must do is edit this batch file to change the ‘mailstorePassword’ field to match the password used in your MailStore server for the ‘admin’ user.
- Find the line set mailstorePassword=’admin’
- Change ‘admin’ to the password
- Next find the mailstoreFingerprint= line and add the pkv3 key from the previous step.
- Save this edited batch file in a folder (for this example we will use the ‘d:\‘
Step 3 Organise your PST files into suitable folders
The batch file is designed to import all PST files in a folder and store them under one MailStore user’s archive. We could just run this manually for each user in turn but for a more automated process I would first suggest you gather all PST files together for each user and store them in a specific folder for that user.
For example under our D:\ drive we would have the following folders…
Step 4 Create a batch file to archive each users set of PST files one after another
Next we should create a new batch file to fully automate the process, lets call it import-all-users.bat
Open the file in your favorite text editor and enter the following lines..
call bulkImportPST.bat d:\jane jane
call bulkImportPST.bat d:\john john
call bulkImportPST.bat d:\fred fred
call bulkimportPST.bat d:\pete pete
Save this new batch file in the root folder that contains the PST folders ( D:\)
This example would run through each user in turn and import all the PST files for that user found in the source folder and store it under that users archive in MailStore. Each time the bulkImportPST batch file is called it configures the ‘templateBulkImportPST’ archive job within MailStore to automate the task of archiving each PST file in turn.
For a large collection of PST files this could take some time so It may be best to leave running overnight.
Things to note…
It would be a good idea to start with just one user and a single PST file to be sure the process is working before extending the Batch File to include a large number of PST files.
Make sure all the users exist in MailStore for this to work or you will see errors when the batch file runs.
- Migrating an Archive Server (ASM) archive to MailStore (zensoftware.co.uk)
- Email archiving methods explained: Journaling Vs. mailbox collection (zensoftware.co.uk)