Back up mail messages to OneDrive
Every Microsoft account comes with 15GB of free storage at OneDrive . This makes it ideal for keeping an automatically updated backup of your mail messages. Here’s a slightly geeky way of doing it, using junctions to keep OneDrive in sync with your store folder. Be very careful when following these instructions – pressing the wrong key might lead to irreversible data loss. You have been warned, so don’t blame me if it all goes pear-shaped. That said, it’s working perfectly for me. Note that the old name – SkyDrive – is still used in some places.
The OneDrive program comes with Windows Essentials 2012. If it’s not already installed, do so: Download OneDrive. Set it up following the prompts.
The WLMail store folder contains a lot of stuff that it’s neither necessary nor wise to back up. For example, the file Mail.MSMessageStore is the index keeping track of all your messages. If you’re in a situation where you need to restore messages from a backup, this large file won’t be much use.
As an example of how to create a real-time back up, here’s how to do it with your storage folders.
- Open the OneDrive folder in your user profile. You can do this by double-clicking on the OneDrive icon in the notification area (‘system tray’ by the clock). In this folder, create a new folder and call it, say, Mail Storage.
- Open your store folder. To find it, in WLMail’s main window, press Ctrl-Shift-O for Options. On the Advanced tab, click Maintenance and then Store folder. Copy the path there into the start search box and press Enter.
- Type cmd into the start search box and press Ctrl-Shift-Enter. Give UAC permission when asked. This will open a command window with administrator privilege. You now have three windows open: an Explorer window open at your OneDrive folder, another one open at your store folder and a command window, which is probably black. Resize the windows so you can always see the command window.
- Switch to the OneDrive window, then Shift-right-click on the ‘Mail Storage’ folder name and select Copy as path.
- Switch to the command window, click inside it, type cd and a single space, then right-click and select Paste. Press Enter. If you did this properly, you should now see something like this:
- Switch to the window showing your store folder. Shift-right-click on Storage folders and select Copy as path.
- In the command window, type mklink /J “Storage folders” and a single space, then right-click and select Paste. You should see something like this:
Click to see the full image
- Press Enter. If you did this properly, you should see a message like this:
Click to see the full image
That’s all there is to it. Storage folders in WLMail is now linked to Storage folders on OneDrive and will remain in sync.
Notes:
You should treat these backup folders on OneDrive as strictly read-only. If you muck about with files in them, the results are unpredictable. The whole path from the message in WLMail to the .eml file at OneDrive is two-way, so any change to the file anywhere on the path will affect it everywhere it appears. For example, if you delete a file from one of the OneDrive folders, you may find that in due course after synchronizing this change all the way back to WLMail, the program has re-created the file with a new name. Deleting, moving or copying messages should all be done within WLMail to avoid problems with the message database.
Because the backup folder in OneDrive on your computer is a virtual one, it won’t (at the moment) be synchronized automatically by the OneDrive app. It will only synchronize when a sync takes place for some other reason, for example making a change in one of the real folders. You can get around this shortcoming by using a little batch file to force a sync.
Junctions (like Mail storage in the instructions) can’t be deleted in Explorer. If you want to remove the junction you created at step 7, open an administrator command window (step 3 above) and Change Directory to your OneDrive folder (e.g. type cd “C:\Users\NB\SkyDrive” and press Enter ). Then use Remove Directory (rd): type rd /S “Mail storage” and press Enter (the /S switch removes the apparent contents of the virtual directory before removing the directory itself).