2 Ways to Auto Back Up Your OST File Periodically in Outlook

If you hope that Outlook can automatically back up your OST file on a periodical basis, you have two optional methods. This article will introduce both of them in detail.

As you can see, all of the items of your Exchange account mailbox are stored in an offline storage table file (OST file). Although it has its advantages, it still has many drawbacks. For instance, it can become inaccessible in many cases. At that point, you will make efforts to repair it. However, Outlook only provides an inbuilt PST repair utility – Scanpst.exe, which is unable to fix OST file. Thus, in order to avoid data loss owing to OST corruption, you’d better back up your OST file periodically. Now, we will introduce you 2 ways to automate periodical OST backups.

Auto Back Up Your OST File Periodically in Outlook

Make Use of “AutoArchive” Feature

As we all know, Outlook comes with a native “AutoArchive” feature. Although it is dedicated to clean up items and reduce mailbox size instead of designed for data backups, you still can make use of it to achieve automatic OST backup. In terms of “AutoArchive”, you have two selectable approaches to it.

  1. One is to customize “AutoArchive” for folders. You can right click any folder in the OST file and choose “Properties”. In the new popup dialog box, switch to “AutoArchive” tab and then customize your own preferred settings.
  2. The other one is to first set the OST file as the default Outlook data file. Then go to “File” > “Options” > “Advanced”. Next find and hit “AutoArchive Settings” button. In the subsequent dialog box, you can specify the settings at will.Make Use of “AutoArchive” Feature

By this means, the old items will be removed from the source OST file and moved to the archive PST file. If what you want is to simply copy the items to a PST file, still keeping them in the OST file, maybe the following method is much better for you.

Utilize Task Reminder & Outlook VBA

  1. To start with, create a new recurring Task.
  • Firstly, name the task as “Back up OST”.
  • Next enable a recurrence for this task on basis of how often you want to back up your OST file.
  • Then set a reminder for this task, which will decide when to back up the file.
  1. After getting such a task, you can press “Alt + F11” key shortcuts.
  2. Then you will access Outlook VBA editor.
  3. Next, copy the following VBA codes into “ThisOutlookSession” project.
Private Sub Application_Reminder(ByVal Item As Object)
    Dim strNewPST As String
    Dim objNewPSTFileFolder As Outlook.Folder
    Dim objSourceOSTFileFolders As Outlook.Folders
    Dim objFolder As Outlook.Folder
    If TypeOf Item Is TaskItem And Item.Subject = "Back up OST" Then
       'Create a PST file in your desired name and local folder
       strNewPST = "E:\Backups\MyOSTBackups\" & "OST Backup" & " (" & Format(Date, "yyyy-mm-dd") & ").pst"
       Outlook.Application.Session.AddStoreEx strNewPST, olStoreUnicode
       Set objNewPSTFileFolder = Session.Folders.GetLast()
       'Get all the folders of the source OST file
       'Change the exchange account to your own case
       Set objSourceOSTFileFolders = Outlook.Application.Session.Folders("exchange_account@datanumen.com").Folders
       On Error Resume Next
       'Copy all the items and folders from the source OST to the new PST
       For Each objFolder In objSourceOSTFileFolders
           objFolder.CopyTo objNewPSTFileFolder
    End If
End Sub

VBA Code - Auto Back Up Your OST File Periodically

  1. After that, sign this code.
  2. Later ensure Outlook enable digitally signed macros.
  3. From now on, every time the recurring task reminder pops up, the macro will run automatically to back up your OST file to a new PST file.
  4. You can find these PST backup files in the predefined local folder, shown like the image below:PST Backup Files

What If Your OST Files Become Orphaned

When the Exchange server crashes or you can’t access your exchange account as normal, your OST file will definitely become orphaned. That is to say, you will be unable to access it. In this case, if you’ve backed up your OST file recently, you can easily utilize the PST backup file. However, if there isn’t such a current and valid backup, you still can resort to a reputable and well-proven third party tool, like DataNumen Exchange Recovery. It can extract all your OST data to a new PST file.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql corruption and outlook repair software products. For more information visit www.datanumen.com

One response to “2 Ways to Auto Back Up Your OST File Periodically in Outlook”

Leave a Reply

Your email address will not be published. Required fields are marked *