Export to PST

PST - Outlook Personal Folders File Format - is a representation of an Exchange Object store. It consists of a hierarchical structure of Folder objects that can contain Contacts, Tasks, Events, or Message objects. These Message objects can further contain Attachment objects. The properties of Folder objects, Message objects, and Attachment objects store all the relevant information about each item.

Bacula Enterprise Microsoft 365 Plugin has the ability to backup and restore Exchange emails and their attachments in a cross-platform format through the email_mime option, as it is discussed in the chapter dedicated to the email module. However, some users find PST format more handy to perform export/import operations. Microsoft 365 Plugin also provides an extension that is capable to perform a transformation from restored Exchange objects to a single PST file.

This extension is served through the extra m365 package named ‘bacula-m365-pst-plugin’, available in the same platforms as the m365 Plugin. This extension is built over an specific technology that requires an extra license. Contact our sales or support team in order to inquire about gaining access and obtaining all the necessary information.

PST Export Installation

Once you have the package, use the appropriate package manager to install it depending on your platform.

Some examples:

rpm -ivh bacula-enterprise-m365-pst-plugin_18.0.1.rpm
yum localinstall bacula-enterprise-m365-pst-plugin_18.0.1.rpm
yum install bacula-enterprise-m365-pst-plugin
apt install bacula-enterprise-m365-pst-plugin
dpkg -i bacula-enterprise-m365-pst-plugin_18.0.1.deb

The package will install the following elements:

  • Two extra jar libraries in /opt/bacula/lib

  • Export binary (m365pst) that invokes the jar files in /opt/bacula/bin. This is the binary to run in order to run the export function

PST Export Usage

Bacula Enterprise Microsoft 365 Plugin PST Export tool is designed to work only with data restored from backups done by M365 Plugin.

The general procedure to have a PST file with the desired contents is:

  1. Perform M365 backup of the desired contents (compatible modules are: email, calendar, contact and tasks)

  2. Run a restore in a local folder (where=/my/local/folder)

  3. Use the m365pst export tool with the path of the locally restored files

This tool accepts 2 main parameters: - src: It must point to the folder containing the restored M365 files. - out: It must point to a path/name of the resulting PST file with the desired name

Below there is an example of the usage of this tool:

m365pst running
/opt/bacula/bin/m365pst -src /my/local/folder -out mypstfile.pst

Please, note the parameters use single ‘-’ and the value of each need to be placed after a space.

An example of successful output:

m365pst running
Will read from source path: /home/bacula/pstdocs/mytenant/
Will write in: /home/bacula/pstdocs/mypstfile.pst
Initializing PST File in /home/bacula/pstdocs/mypstfile.pst...
Initialization of /home/bacula/pstdocs/mypstfile.pst completed
Organizing file tree...
File tree successfully read
Linking attachments to father objects...
Attachments successfully linked
Adding messsages with attachments...
Messsages with attachments successfully added
Adding rest rest of the messages...
Rest of the messages successfully added
Adding contacts...
Contacts successfully added
Adding messsages with attachments...
Events with attachments successfully added
Adding events...
Events successfully added
Adding TodoTasks...
TodoTasks successfully added
PST successfully generated in /home/bacula/pstdocs/mypstfile.pst with: 57 folders - 508 messages - 93 message attachments - 20 contacts - 952 calendar events - 10 event attachments - 133 todo tasks