{"id":189,"date":"2022-01-19T18:34:12","date_gmt":"2022-01-19T16:34:12","guid":{"rendered":"https:\/\/venetainformatica.com\/?p=189"},"modified":"2022-01-19T18:34:17","modified_gmt":"2022-01-19T16:34:17","slug":"moving-an-exchange-offline-data-file-ost","status":"publish","type":"post","link":"https:\/\/venetainformatica.com\/index.php\/2022\/01\/19\/moving-an-exchange-offline-data-file-ost\/","title":{"rendered":"Moving an Exchange Offline Data File (*.ost)"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>While it&#8217;s usually not necessary to relocate the offline cache (*.ost) used by an Exchange account, it is possible to move it to another folder or partition. For the most part, it only makes sense to move it if the C: drive is full or a smaller SSD.<\/p><\/blockquote>\n\n\n\n<p><strong>Outlook 2013 and newer IMAP&nbsp;<\/strong>ost files are moved using the&nbsp;<a href=\"https:\/\/www.slipstick.com\/outlook\/config\/how-to-move-the-imap-personal-folder-pst\/#forcepstpath\">ForcePSTPath key<\/a>.<ins><\/ins><\/p>\n\n\n\n<p>Moving the offline cache so its easier to back it up is generally pointless: it&#8217;s an offline copy of your Exchange mailbox and it can only be opened by the account that created it. If you try to use an old cache file, Outlook will complain that it doesn&#8217;t match the server mailbox. If the server fails and there is no server backup, the contents of the current, most up-to-date *.ost can be used to repopulate the server. In short, if you want a usable backup of your mailbox, export the contents to a *.pst file instead of including the *.ost in a backup file.<\/p>\n\n\n\n<p>If you need to recover data from an orphaned ost file, I have a list of commercial recovery software listed at&nbsp;<a href=\"https:\/\/www.slipstick.com\/problems\/pst-repair\/convert-an-exchange-offline-file-ost-to-a-personal-file-pst\/#tools\">Convert an Offline File (.ost) to a Personal File (.pst)<\/a><\/p>\n\n\n\n<p>With that disclaimer out of the way, if you do need to relocate the offline file, you can move it using one of the following methods.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#forceostpath\">Set the ForceOSTPath registry key.<\/a>&nbsp;This is the recommended method but you need to set the key before creating the account in your profile.<\/li><li>Use&nbsp;<a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#symlinks\">Symbolic links or Junction points<\/a>&nbsp;in Windows to redirect the folder to a new location.<\/li><li><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#2013\">Set the OST file location<\/a>&nbsp;while adding the account to your profile.<\/li><li><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#notrec\">Trick Outlook<\/a>&nbsp;into letting you choose the ost file by using a renamed PDF file.<\/li><\/ul>\n\n\n\n<p><a><\/a><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#forceostpath\">&nbsp;<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Using ForceOSTPath to set the file location<\/h1>\n\n\n\n<p>The easiest way to change where Outlook says the OST files is setting the ForceOST registry key, however you need to do this before you add the account to your profile, or remove the account and add it back after setting the key. Administrators can set the key using GPO or a log on script.<\/p>\n\n\n\n<p>The ForceOSTPath key is supported in current versions of Outlook. In Outlook 2010 and up, it will apply to new accounts in a profile, while in Outlook 2003 and 2007, it applies only to new profiles.<\/p>\n\n\n\n<p>You need to set this key before you add the account to your profile.<\/p>\n\n\n\n<p>To set the registry key:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open the registry editor (Press Windows key + R to open the Run command.<\/li><li>Type regedit in the Open field and press Enter.)<\/li><li>Browse to the Outlook key for your version (listed below).<\/li><li>Create a string value named&nbsp;<strong>ForceOSTPath<\/strong><\/li><li>Right click on ForceOSTPath value and choose Modify<\/li><li>Paste the path into the field and press Enter. (You can use variables if you are using group policy to push it out to your users.)<\/li><\/ol>\n\n\n\n<p><strong>Outlook 2016<\/strong><\/p>\n\n\n\n<p>HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\16.0\\Outlook<br>Expandable String Value: ForceOSTPath<br>Value data: full path you want to use<ins><\/ins><\/p>\n\n\n\n<p><strong>Outlook 2013<\/strong><\/p>\n\n\n\n<p>HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\15.0\\Outlook<br>Expandable String Value: ForceOSTPath<br>Value data: full path you want to use<\/p>\n\n\n\n<p><strong>Outlook 2010<\/strong><\/p>\n\n\n\n<p>HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\14.0\\Outlook<br>Expandable String Value: ForceOSTPath<br>Value data: full path you want to use<\/p>\n\n\n\n<p><strong>Outlook 2007<\/strong><\/p>\n\n\n\n<p>HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\12.0\\Outlook<br>Expandable String Value: ForceOSTPath<br>Value data: full path you want to use<\/p>\n\n\n\n<p><strong>Outlook 2003<\/strong><\/p>\n\n\n\n<p>HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\11.0\\Outlook<br>Expandable String Value: ForceOSTPath<br>Value data: full path you want to use<ins><\/ins><\/p>\n\n\n\n<p>Common variables<\/p>\n\n\n\n<figure id=\"table1\" class=\"wp-block-table\"><table><tbody><tr><th scope=\"col\">Variable<\/th><th scope=\"col\">Typical value (May vary)<\/th><\/tr><tr><td>%APPDATA%<\/td><td>C:\\Users\\{username}\\AppData\\Roaming<\/td><\/tr><tr><td>%LOCALAPPDATA%<\/td><td>C:\\Users\\{username}\\AppData\\Local (default for OST files)<\/td><\/tr><tr><td>%USERPROFILE%<\/td><td>C:\\users\\{username}<\/td><\/tr><tr><td>%WINDIR%<\/td><td>C:\\Windows<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><a><\/a><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#symlinks\">&nbsp;<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Symbolic Links or Junction Points<\/h1>\n\n\n\n<p>You can use&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/FileIO\/symbolic-links\">Symbolic Links<\/a>&nbsp;or&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/VSS\/junction-points\">Junction Points<\/a>&nbsp;to repoint the file or folder where the .ost is stored. You can use this method to move the folder to the new location or just the data file.<\/p>\n\n\n\n<p>To create a Symbolic Link, you&#8217;ll use the MKLINK Command line.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Close Outlook.<\/li><li>Move the ost-file or pst-file from its original location to its new location.<br>The default location is %locaappdata%\\Microsoft\\Outlook<\/li><li>Open a Command window using Run as Administrator. Type cmd on the Start menu, right-click on Command Prompt or cmd.exe and choose Run as administrator. you&#8217;ll need to enter the administrator password or Yes to allow the prompt.<\/li><li>Use the mklink command in this format:&nbsp;<em>mklink &#8220;C:\\old-path&#8221; &#8220;D:\\New path&#8221;<\/em>. If you are moving just the data file, you&#8217;ll need to include the data filename.&nbsp; Quotes are required if the path contains spaces.<\/li><\/ol>\n\n\n\n<p>For example:<br><code>mklink %localappdata%\\Microsoft\\Outlook\\diane@contrarytech.com.ost \"D:\\Outlook Data Files\\diane@contrarytech.com.ost\"<\/code><br><a href=\"https:\/\/media.slipstick.com\/images\/2011\/exchange\/symbolic-links.png\"><\/a><\/p>\n\n\n\n<p>When you use a symbolic link to move a file, a shortcut is created in the default folder location. If you want to revert back to the original location, delete the shortcut to break the link.<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/media.slipstick.com\/images\/2011\/exchange\/symbolic-link-example.png\" alt=\"\" width=\"427\" height=\"21\"><\/p>\n\n\n\n<p>If you prefer to use PowerShell to create the symbolic links, use the&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/Microsoft.PowerShell.Management\/New-Item?view=powershell-5.1\">New-Item<\/a>&nbsp;cmdlet. You&#8217;ll need to use quotes if the path contains spaces. If you don&#8217;t want to use the exact path, call the environment variable like this:&nbsp;<em>$env:localappdata<\/em><br>You will need to move or rename the original file before running the powershell.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">New-Item -Path $env:localappdata\\microsoft\\outlook\\diane@contrarytech.com.ost -ItemType SymbolicLink -Value \"D:\\Outlook Data Files\\diane@contrarytech.com.ost\"<\/pre>\n\n\n\n<p><strong>Create a Symbolic link for a folder<\/strong><br>To create symbolic links to a folder, you need to move, delete, or rename the folder you are creating the symlink for. In this example, it&#8217;s the Outlook folder. If the folder exists, the powershell will error.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">New-Item -Path $env:localappdata\\microsoft\\outlook\\ -ItemType SymbolicLink -Value \"D:\\Outlook Data Files\\\"<\/pre>\n\n\n\n<p><a><\/a><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#2013\">&nbsp;<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Move the OST and recreate the account<\/h1>\n\n\n\n<p>If you have an existing ost file, you can move the .ost file, remove and recreate the account in the profile using the&nbsp;<strong>Control panel, Mail<\/strong>&nbsp;applet and point it to the new location.<ins><\/ins><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Copy your .ost file to the new location. You can skip this step if you want to create a new .ost file.<\/li><li>Open&nbsp;<strong>File, Account Settings<\/strong>&nbsp;or open the profile in&nbsp;<strong>Control panel, Mail<\/strong>.<\/li><li>Remove the account from your profile.<\/li><li>Click&nbsp;<strong>New<\/strong><\/li><li>Enter your username and password and let Outlook find your account information<\/li><li>Select the&nbsp;<strong>Change account settings<\/strong>&nbsp;option, and then click&nbsp;<strong>Next<\/strong><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.slipstick.com\/images\/change-account-settings.png\" alt=\"Change Account Settings\" width=\"500\" height=\"354\" srcset=\"https:\/\/media.slipstick.com\/images\/change-account-settings.png 500w, https:\/\/media.slipstick.com\/images\/change-account-settings-450x319.png 450w, https:\/\/media.slipstick.com\/images\/change-account-settings-325x230.png 325w\"><\/li><li>Click&nbsp;<strong>More Settings<\/strong>&nbsp;(1)<\/li><li>On the&nbsp;<strong>Advanced&nbsp;<\/strong>tab, click&nbsp;<strong>Outlook Data File Settings<\/strong>. (2)<\/li><li>Click&nbsp;<strong>Browse&nbsp;<\/strong>(3), browse to the .ost file that you copied in step 1, and then click Open.<\/li><li>If you want to create a new .ost file, browse to the new location, enter a filename, and then click Open. Outlook will create the new .ost file.<\/li><li>OK your way back to Outlook then restart Outlook.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/static.slipstick.com\/images\/outlook-2013-move-ost.png\"><img decoding=\"async\" src=\"https:\/\/media.slipstick.com\/images\/outlook-2013-move-ost-575x408.png\" alt=\"move ost in Outlook 2013\" class=\"wp-image-27525\"\/><\/a><\/figure>\n\n\n\n<p>Tip: You can jump to the ost location in Windows XP, Vista, or Windows 7\/8 by typing or pasting this command into the address bar of Windows Explorer and pressing Enter:<br><strong>%localappdata%\\Microsoft\\Outlook<\/strong><\/p>\n\n\n\n<p><a><\/a><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#2010\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Move the *.ost in Outlook 2010 and older<\/h3>\n\n\n\n<p>In Outlook 2010 and older, you can move the ost used by cached Exchange to another location by disabling offline mode then changing the path on the Advanced tab of the Exchange account properties.<\/p>\n\n\n\n<p>If you want to move the ost before you create a profile, use the&nbsp;<strong>ForceOSTPath&nbsp;<\/strong>registry value.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open&nbsp;<strong>Account Settings<\/strong><\/li><li>Click&nbsp;<strong>More Settings<\/strong>&nbsp;(1)<\/li><li>Deselect&nbsp;<strong>Use Cached mode<\/strong>&nbsp;(2) and click Apply.<\/li><li>You can close Outlook and move the ost file now. If you want to create a new .ost file, you can skip this step.<\/li><li>Click&nbsp;<strong>Outlook Data File&nbsp;<\/strong>button (3)<\/li><li>Disable offline use (4) if Browse button is not enabled<\/li><li>Click Browse button to select moved ost file (5)<\/li><\/ol>\n\n\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/cdn.slipstick.com\/images\/move-ost-file.png\"><img decoding=\"async\" src=\"https:\/\/cdn.slipstick.com\/images\/move-ost-file-575x396.png\" alt=\"Move the cached Exchange ost file in Outlook 2010 and older\" class=\"wp-image-27518\"\/><\/a><\/figure>\n\n\n\n<p><br><a><\/a><a href=\"https:\/\/www.slipstick.com\/exchange\/moving-outlook-ost-file\/#notrec\">&nbsp;<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Not Recommended PDF Method<\/h1>\n\n\n\n<p>This method is not recommended as it can break your address book. You&#8217;ll need to let Outlook create new ost files and re-sync your mailbox.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Close Outlook.<\/li><li>Open Windows Explorer and type or paste %localappdata%\\microsoft\\outlook in the address bar then press Enter.<\/li><li>Copy a PDF file into the folder.<\/li><li>Copy the ost name, then rename the ost file by adding -old to the end of the name. (This is easier if you have Show Extensions enabled.)<\/li><li>Rename the PDF file using the old ost file. You need to change the extension to ost.<\/li><li>Open Outlook.<\/li><li>Outlook will complain that it can&#8217;t use the ost.<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.slipstick.com\/images\/2011\/exchange\/ost-not-right.png\" alt=\"Error message that ost is wrong\" width=\"489\" height=\"185\" srcset=\"https:\/\/media.slipstick.com\/images\/2011\/exchange\/ost-not-right.png 489w, https:\/\/media.slipstick.com\/images\/2011\/exchange\/ost-not-right-450x170.png 450w, https:\/\/media.slipstick.com\/images\/2011\/exchange\/ost-not-right-325x123.png 325w\"><\/li><li>Browse to the new location.<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.slipstick.com\/images\/2011\/exchange\/new-ost.png\" alt=\"Create a new ost in the new location\" width=\"342\" height=\"139\" srcset=\"https:\/\/static.slipstick.com\/images\/2011\/exchange\/new-ost.png 342w, https:\/\/static.slipstick.com\/images\/2011\/exchange\/new-ost-325x132.png 325w\"><\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">More Information<\/h4>\n\n\n\n<p>The steps to move IMAP, POP, Sharepoint or Internet calendar pst files are similar. Outlook 2007, 2010, and 2013 support the&nbsp;<a href=\"https:\/\/www.slipstick.com\/outlook\/config\/how-to-move-the-imap-personal-folder-pst\/#ForcePSTPath\">ForcePSTPath<\/a>&nbsp;registry value, which changes the default *.pst path for POP3, IMAP, and SharePoint data files. See&nbsp;<a href=\"https:\/\/www.slipstick.com\/outlook\/config\/how-to-move-the-imap-personal-folder-pst\/\">How to move the IMAP personal folder (*.pst)<\/a>&nbsp;for more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While it&#8217;s usually not necessary to relocate the offline cache (*.ost) used by an Exchange account, it is possible to move it to another folder or partition. For the most part, it only makes sense to move it if the C: drive is full or a smaller SSD. Outlook 2013 and newer IMAP&nbsp;ost files are [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":1,"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":190,"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/posts\/189\/revisions\/190"}],"wp:attachment":[{"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/venetainformatica.com\/index.php\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}