Help! I accidentally removed some files from my database and I don't know how to get them back where they belond

Here’s the scenario.
One of my clients requested copies of some old documents that I had put together for him. Since I have all (read: a lot but not actually all) of my work files organized in DEVONthink, I navigated to the group where I keep my work for this client, and then created a new group that I named “20220111 Files for Client” (keeping in line with my typical file naming scheme). I proceeded to replicate about a dozen items from different subfiles in this client’s project into the new group I had created.

When I was done tracking down the relevant files, I selected them all and dragged them into a folder on my desktop. In retrospect this was a mistake. I wanted to copy those files to my desktop – I didn’t want to remove them from my database. After I realized the mistake I had made, I noticed that some of the items in my DT database had changed to say that the items were missing. I tried pressed Cmd+Z to Undo, but it didn’t solve my problems. I managed to recover some of these files one by one via Time Machine. But some other items in the group had disappeared from my DT database all together.

How can I fix this? I have the files on my desktop, but I want them to go back into my database. The problem is A) I don’t remember where these files are supposed to go (my group is full of subfolders and I remember where I found these files), and B.) when I try reimporting/reindexing these files, they get assigned a new ID. Before I accidentally removed the files, the IDs were x-devonthink-item://6F6C7161-0BA7-4843-AAF3-A031D4C24AFF and x-devonthink-item://12CD3D54-8F54-4BFD-B31F-ECF90AF4A2FD. I have a bunch of other documents where I link to these items using their ID. If I reimport the files under different IDs, all these other linked documents break. What should I do?

ve only been using DEVONthink for a few months, and I started working with this client before

Dragging files from DEVONthink to the Finder or desktop should definitely copy them, even pressing modifier keys can’t change this (just checked this again). Or did you drag & drop the files in the Finder, do you use PathFinder or anything else that might explain this unexpected behaviour?

The easiest solution would of course be to restore a complete backup of the database (and if there’s none it’s about time to implement a good backup strategy). If the database was already synchronized to a sync store, then it should also be possible to download the missing files from the sync store.

How many files are actually missing? See File > Verify & Repair Database…

Thanks for the speedy reply! I did a complete restore of the database from Time Machine shortly after this little disaster occurred. Even after the restore, when I opened the database in DEVONthink, the file seemed to removed itself from the database.

My guess is that the files that I couldn’t replace inside the database were actually indexed and not imported originally (and I don’t don’t know how to go back and check if this is the case.). Would it be expected behavior for DT to synchronize indexed files that had been dragged out of the database by removing them from DT?

I use Dropover (which is similar to Yoink and Dropshelf etc).

Removing indexed files might also explain this, although it’s still unclear what exactly you dragged (e.g. from which view/window/app and what was selected?).

Does File > Verify & Repair Database… actually report any issues at all? Or are the items completely gone in the database?

At first it showed quite a few, but I was able to replace them. Now it shows that no files are missing. But it’s wrong. I am absolutely certain that I dragged some files out of my DT database and into a folder in the Finder.

If the database contains indexed folders and you removed some indexed files in the Finder, then the database would be automatically updated by DEVONthink (as the filesystem and indexed groups are updated in both directions).

Are the files still in this Finder folder?

Yes, they are. I’m uploading a photo that I hope clarifies some things. In it you can see see two links to documents Left Cant Meme and Left Cant Meme V2. These are the files that were removed from my database, so the links are now broken. In the screenshot you can also see a floating bubble from Dropover. I don’t remember if I used it during this particular incident. I usually remember to avoid using it when I’m moving files within DT because it doesn’t work right. But when I’m moving files outside of DT it’s never a problem.

I’ll check whether this tool can indeed cause such issues. However, if File > Verify & Repair Database doesn’t report any remaining problems, then it’s not possible to restore the files without breaking the item links.

It’s definitely a severe issue of Dropover as it moves the files instead of copying them and therefore ignores the information provided by DEVONthink (contrary to e.g. the Finder or PathFinder). This can in the end cause missing file issues.

Yoink, by our friend at Eternal Storms Software, doesn’t exhibit this behavior.

2 Likes