Encrypted Database Volume Unexpectedly Unmounted at every Time Machine backup

I’ve been trying to use an encrypted database with DEVONthink (3.5.1) and it’s been getting regularly closed with messages like:

07:06:55: /Volumes/Test Encrypted Database/Test Encrypted Database.dtBase2 Database volume was unexpectedly unmounted, the database will be closed.

After looking into the problem for a while, I believe this is coinciding with my Time Machine backup running. The Time Machine backup is to a network volume on a Synology box, so it works like an Apple Time Capsule backup, which may be relevant (as that process itself mounts a disk image across the network.)

It seems to be reproducible: I just followed these two steps:

  1. Create new encrypted database in DEVONthink
  2. Start Time Machine backup by choosing “Back Up Now” from Time Machine’s menubar icon

…and the encrypted database was unexpectedly unmounted within the first minute of the backup starting. It seems to coincide exactly with the moment Time Machine starts “Preparing Backup” after finding and mounting the network Time Machine volume.

Has anyone else seen this? I’d like to use an encrypted database, but this is cramping my style somewhat…

Thanks,

Matt

Matt, I’m damned if I can find it, but this has been previously described here in the forum, is a known bug when using encrypted databases and TimeMachine on a network drive with Catalina (apparently only that combination, IIRC).

What is strange is that I had understood that encrypted databases are automatically excluded from backup whilst open (to avoid the behaviour you describe). That appears not to be the case.

Possible workaround: manually exclude your databases from the TM backup (I don’t know whether that helps, try and see…; if so: set DT to automatically make a daily copy of your databases (it makes a copy and zips it, IIRC) to a location which is backed up.) I believe the next maintenance release will contain a workaround.

This thread contains some further details.

That’s correct and the next maintenance release will work around this issue of Catalina’s Time Machine.

Could you shed some light on the work-around you’re working on?

I misunderstood you in one of the previous topics (my bad) as I now understand it’s network backup volumes used by Time Machine that seem to ‘cause’ local encrypted volumes to be unmounted.

The issue might be relevant beside DT as encrypted volumes can be created for other reasons (although Time Machine automatically unmounting those are perhaps less annoying).

The encrypted databases of DEVONthink use a unique extension (.dtSparse) so that double-clicking on them in the Finder opens DEVONthink. However, to activate & mount them the extension has to be changed temporarily to .sparseImage, otherwise macOS would always mount the volume as read-only.

This seems to confuse Time Machine in case of network backups as it can’t find the sparse image anymore (as it was only temporarily renamed) and assumes that the volume is orphaned and unmounts it.

However, this is IMHO a bug or a not that smart feature of Catalina’s Time Machine because…

  • this is not the job of Time Machine, macOS should handle this
  • only network backups are affected
  • several files on the volume are still opened and therefore the volume is obviously still in use
  • sparse images might also be renamed in the Finder while in use

The workaround of the upcoming maintenance release is therefore quite easy & obvious - the extension is not only temporarily changed but as long as the database is opened.

To make a long story short - this issue doesn’t affect regular sparse images usually.

2 Likes

Thanks for that Criss - it’s nice to take a peek under the hood and see how things work :slight_smile:

Yes, thank you! That explains everything. My encrypted database isn’t vital at the moment, so I shall simply look forward to the maintenance release and start using it then.

I didn’t want to start another thread, but I’m getting my Database closed due to Time Machine. I’m on the new macOS version.

Why not? This thread is more than two years old and DT as well as macOS have moved on. Threads are not a scarce resource.

1 Like

Which macOS version and DEVONthink version do you actually use?

1 Like

I’m on DT version 3.8.7 and macOS Ventura 13.1

In which folder are your encrypted databases located? Is this folder backed up by Time Machine?

I don’t think they are encrypted. They are located inside an external SSD inside a “Databases” folder created I think by DT. I never set up Time Machine, when I open it, it asks for a place to save the backup.

Another reason to open a new thread – this one is dealing with … see header.

Hold the Option key and choose Help > Report bug to start a support ticket.

1 Like

Will do, thank you.