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:
Create new encrypted database in DEVONthink
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…
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.
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.