Syncing Mailstore Home Directory to cloud OneDrive

I have been using Mailstore Home successfully for many years. I backup my files from several mail accounts locally from Thunderbird. I do this only manually about once a week. I am in the process of setting up a new computer that will become my main device, and I noticed a warning to not sync Mailstore Home directories via OneDrive or any program like that. I am wondering why that warning?

I use OneDrive primarily as a cloud backup for my files rather than keeping a lot of devices in sync. I have included the Mailstore Home directory for more than a year without any issues. If I could set OneDrive to only backup my Mailstore Home files to the cloud, but not sync the other way, I would do that – but that does not seem to be any option. I will only have Thunderbird active, and do my weekly Mailstore Home backups manually, from my primary device. The other computer (older one) I will keep updated as a backup device in case I need it when something happens to my main device. I could see value in using OneDrive to help me keep all my data directories in sync for when I need to use the backup.

Is this going to cause me any issues? I might be able to understand if I know why Mailstore Home recommends no syncing to the cloud. Thanks.

1 Like

The issue here is that many real-time synchronization tools open files with an exclusive lock while synchronizing, which will block MailStore from accessing the database. Conversely, the sync product needs to access MailStore’s database files which themselves are locked, leaving the cloud version of the database in an inconsistent state.

Instead, copy the files (using MailStore’s own backup feature or by copying the files) manually from MailStore’s Home data directory to OneDrive’s directory while MailStore isn’t running.

1 Like

Good to know. I also use OneDrive as a backup so this is valuable info.

Thank you very much for that explanation. I have been letting OneDrive back up my MailStore Home directory without any problems, but I may have been lucky. I have switched MailStore to a new directory that is not connected to OneDrive and copied the files there. I will copy them back to the OneDrive directory after I do a MailStore archive operation and after closing the program. The only drawback is that I have two copies of my full MailStore archive on my disk, but disks are pretty large these days so that is a reasonable thing to do.

The reality is that storing MailStore’s data in a directory monitored by real-time synchronization software will often appear to work, and might even be working just fine. Those are not words I like to associate with my long-term data storage.

You also might not know until you have a failure and are restoring from the cloud – The worst case scenario is that the machine running MailStore Home is gone (or wiped) and the copy on OneDrive turns out to be in an inconsistent state, such that you lose access to some or all messages.

There is another case that absolutely will cause you problems that I neglected to mention: If you launch two copies of MailStore Home on different computers using the same set of database, and both try to archive messages at the same moment you are nearly guaranteed to lose data on at least one side, and if you are a little unlucky, you could actually lose access to what was archived on both sides due to the mismatch.

Even if you are careful to only launch from one machine at a time, because OneDrive and similar tools are inherently file based and don’t guarantee atomic updates at the directory level, you can end up in this state just by not leaving enough time between when MailStore Home closes and OneDrive finishes the synchronization then moving to another computer.

Dropbox, OneDrive, Google Drive, and anything else that attempts to synchronize or backup files in real-time will be subject to these issues to varying degrees. But by using MailStore’s backup feature (or other tools to copy the files while MailStore Home isn’t running) you’ll get a consistent “point-in-time” database that will be fully restorable.

1 Like

Since some months ago, Microsoft updated the OneDrive’s behavior changing how OneDrive sync files:

-before this, OneDrive was synchronizing files even if they were blocked by other services
-now, instead, OneDrive does some checks and, if it detects that a specific file is blocked, it waits until the file is unblocked and then start the sync.

I don’t have any issues, but I made a backup copy, just in case.

Hi @nicos18 ,

MailStore Home stores container files of a database to disk.
These must all be of the same state when backed up.
When OneDrive is just monitoring and copying files when needed, they are not standing still and being copied over at a very same moment.
So your backup might be of use when trying to recover, or maybe not. It is a gamble - and gambling might not be the method you want to archive with.
So you can use OneDrive, but there is no guarantee that actually using this backup to recover data will actually work.

Instead, we’d recommend using the backup feature in MailStore Home regularly to write a consistent copy of that database to a separate location. And this location is then sleeping and not used, so there would be a good point to sync this with OneDrive.

I’ve just done an install on a new machine and Windows now points everything by default into the onedrive\documents directory. On other programmes I can usually change this but on the latest version of Mailstore it seems not.

Hello,

If you need to find your current data directory, do the following:

  1. Start MailStore Home.
  2. Click on the Administrative Tools item.
  3. Find the Emails and Settings section at the top.
  4. Click the Show in Windows Explorer button.
  5. Close MailStore Home.

You can now configure MailStore Home’s location to store data:

  1. Close MailStore Home.
  2. Move the directory on disk if necessary.
  3. Click the Start menu.
  4. Navigate to Programs.
  5. Open MailStore Home folder.
  6. Launch the shortcut/tile MailStore Home - Configuration.
  7. Click Choose Archive….
  8. Select the directory containing the restored archive files.
  9. Click OK.

As @Rebecca mentioned above, it is recommended that you do not place MailStore Home’s data directly in OneDrive, instead, use MailStore Hom’s* internal backup feature as described in our Backup and Restore article.

If you work out of a OneDrive directory things will appear to work, but you are gambling that things won’t be in a consistent state when you need to recover from a new system.

1 Like