Skip to main content

HOW-TO Back Up Outlook Data Files

Thread needs solution
Forum Member
Posts: 11
Comments: 33

Background:

MS Outlook 365/Exchange uses the MAPI protocol which provides the benefit of mirroring the Outlook data between the client Outlook and Exchange serve. If for example, your local drive fails or your Windows installation fails, once back up and running with Outlook installed, your Outlook data will be synced from the Exchange server and all is well again. However, if you inadvertently permanently deleted a needed Email, Task, Appointment or Contact, in Outlook, it's gone forever on both the client and server.

Problem:

Your ATI backup is also no help because the local Outlook data files have the .OST extension and as of ATI 2020, these are excluded from ATI backups.

The ATI backup uses the Microsoft VSS Service which excludes any files referenced in the registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToSnapshot

MS explains why files are excluded as follows-  "a file should be excluded from shadow copies only if it is large, undergoes significant change between one shadow copy and the next, and does not need to be backed up."

You could delete this key but upon reboot (at least on my machine) the key is restored.

Solution:

My solution was to create a separate OST backup using an OS batch file and calling it in an ATI Backup Task Post-Command.

My ATI backups follow a Grandfather, Father, Son scheme where I always have 3 recent backups. I split the 7 days among 3 separate Backup Tasks as follows:

  • Tuesday-Thursday-Saturday = BakA
  • Monday-Friday = BakB
  • Wednesday-Sunday = BakC

I wanted the same scheme for the OST backups so the below batch does the following

  • Determines the numeric equivalent of the day of the week
  • Branches to the command that copies to the referenced target folder
  • Overwrites the prior copy of the OST file

 

Backup_OST.cmd:
-------------------------------------------------------------------------

for /f "skip=1" %%a in ('WMIC Path win32_LocalTime Get DayOfWeek') do if not defined dayNumber set dayNumber=%%a

FOR %%b in (2 4 6 ) DO IF %%b==%dayNumber% goto BakA

FOR %%b in (1 5 ) DO IF %%b==%dayNumber% goto BakB

FOR %%b in (3 7 ) DO IF %%b==%dayNumber% goto BakC

:BakA
xCopy C:\Users\myname\AppData\Local\Microsoft\Outlook\*.ost D:\Acronis\Outlook-OST\BakA /Y
goto quit

:BakB
xCopy C:\Users\myname\AppData\Local\Microsoft\Outlook\*.ost D:\Acronis\Outlook-OST\BakB /Y
goto quit

:BakC
xCopy C:\Users\myname\AppData\Local\Microsoft\Outlook\*.ost D:\Acronis\Outlook-OST\BakC /Y

:quit
@echo.

Date /T & Time /T
-------------------------------------------------------------------------

Also:

  • (D) represents an external USB backup drive
  • For debugging purposes you can pipe the screen output of the command to a text file by adding this to the Pre-Command Argument :    >C:\MyLogs\BackupOSTLog.txt 2>&1
  • There are a number of utilities for accessing OST files outside of Outlook. I use SysTools OST Recovery

Please let me know if anything above is incorrect or if other/better solutions are available.

1 Users found this helpful