Misleading Sync UI and related database questions

Hi community, I have a suggestion and a related question about DT’s sync functionality.

I just realized that if a database that exists locally has been closed (that is, not shown) in DT, in Preferences > Sync, it’ll looks like not existing locally but only remotely. Like so:

In my case, the private database was closed locally some time ago by myself, but I forgot it. When I looked into current Sync state as shown above, it misled me into thinking the private database was somehow deleted locally (but still available remotely), so I imported it again, which concerns me as soon as I realized the database already exists locally.

Now the question is: Will my private database that already exists locally (but closed) be overwritten by remote one? If so, what if the local and remote versions differ in content (changes might not get synced yet), will I unknowingly lose my data this way?

I would suggest the “local” part of Sync pane shows all locally available databases, not only open databases, and “remote” part shows only those not existing locally.

What exactly did you do?

I clicked that “Import database” (rectangle-with-an-outwards-arrow) button.

Interesting; I can’t test my theories on this unfortunately, so I’ll share them with you and perhaps you can tell me which one is correct.

  1. When you imported private, local DT set up a new database; effectively you now have two copies of the same database, with the same ID, but possibly with differing content. The two databases might be in different locations; if your imported database private is still open, simply select Database Properties… from the context menu, and see where it is located in the file system. Is it where you otherwise store your databases? Are there two copies of the database in your file system?

  2. When you imported private, local DT recognised that the database already exists, opened it and synced it.

I don’t know which of those two options actually happens, so I’d be interested to hear what you find. What I find very unlikely is that local DT would silently overwrite an existing database on importing; at this stage I think it is unlikely that you have lost any data. I would caution that if there are two copies of database private, you should not open them both at the same time (they will have the same ID, so that would cause conflicts). I would make a backup (i.e., copy) of the original private database and store it safely; I would rename the imported database; I would open the original database and sync it; I would check sync had done what I expected it to do; if all is ok, I would delete the imported database which I had previously renamed; I would keep the backup of the original database for so long as I need to be completely sure all is o.k. - forever, if it is an important database.

Well, first of all, thanks for such a reply. I’ll share with you what I investigated after clicking that innocent “Import database” button.

  1. First I listed items under /Users/$USER/Databases, there was a single private database, namely private.dtBase2. So I guessed DT didn’t make a duplicate.

  2. I opened /Users/$USER/Databases/private.dtBase2 in Finder to check the last modified time of various directories and files in the package. There were two files that seemed changed at about the same time as I clicked “Import database” button, DEVONthink-1.dtMeta and Settings.plist.

  3. I checked last modified time of a random subset of files under Files.noindex. Nothing got me suspicious. So I assumed the files didn’t get overwritten.

As this specific database itself isn’t that important for me, I just left it as is and went back working on other stuffs. So I guess your second theory might be correct. But I wanna know about what happened so that I can handle it more safely in the future, therefore the question and suggestion on UI improvement.

Thanks for your suggestions for data safety handling. As I constantly running Time Machine backup on my mac, the original database should be recoverable even if things really went astray.

1 Like

If you attempt to import a database that exists locally but is not open, it merely opens the local copy, nothing more. It does not create a new copy of the database nor does it overwrite anything.


Jim, is that regardless of the location of the database on the local drive? What I’m asking, I guess, is does DT3 keep an “internal” list of databases (or their IDs) which it has seen previously? Or does it just take a look in the default location when performing an import as described?

DEVONthink knows the path of the databases.

DEVONthink knows quite a lot :wink:

Thanks for that; obviously that makes sense (so much so, that I’m not quite sure how I could assume a possibility it could be otherwise).


It actually will locate an existing database if it has been moved, though I think there are limits to this. Local relocations, e.g., from Databases to Documents, work with no issue.