And Emptying Just from the "Database" Mean What Exactly?

I’ve been playing around with DEVONthink on my (thankfully) well backed up computers. I have an old iMac running Catalina with a rather large hard drive that holds everything, and then I have a laptop running Big Sur with a smaller disk that holds much less. I synch between the two using iCloud (Cloudkit).

At some point, I seem to have decided to index (I thought) a critically important folder. I have no idea to what database I did this with and I’m not sure how to check. Later I decided having two sets of the files was unnecessary, so I moved the files in the DEVONthink database to the trash where they’ve been sitting for a few months.

Last week, I was using DEVONthink on my laptop and noticed the old files in the trash. Figuring they were just indexed links to the actual files and not the real things, I emptied the trash. It gave me three choices before doing this, and I don’t recall what the second two were, but the first was whether to remove just from the database. I assumed that meant the DEVONthink database, so I chose that. However, when I checked the folder on the disk a minute later, a bunch of my folders were gone. I restored from backup and thought all was well, but when I looked in the folder again about a week later, the files were gone from the disk again. I hadn’t touched DEVONthink’s trash since that one time, so I have no idea what happened there. Maybe removed when the computers synched?

Today, I looked on my laptop and discovered some items from this same folder were now in my DEVONthink global Inbox. I watched as the app synched over all of the files. I was curious to see what would happen if I deleted them from DEVONthink again. Because, honestly, I wasn’t sure if it was user error the first time.

So, I moved the new folders to the trash in DEVONthink, and checked the actual folders on the disk. The files were there. I then emptied the DEVONthink trash from my laptop, selected Database when asked to just remove the files from the DEVONthink database. When it completed, I checked the disk again, however, the files were gone again from there, too.

I just restored from backup again. Any idea what’s up here? I have plenty of backups of this folder and I suppose I could keep doing this forever, but it’d be great to make it stop. I just have no idea where to begin trying to figure this out.

Welcome @BillD

You should read and understand the Help > Documentation > In & Out > Importing & Indexing section, especially the Indexing and the filesystem subsection. This covers the tight integration with the Finder and the consequences of action, like deleting indexed items.