How to restore files after closing DT

After I pressed command+Q (quit) instead command+A the files I was working with for several time were deleted (or just DT didn’t save them). How can I restore them? I don’t want to do the same work for the second time

Did you quit the app or did it crash? On quit all modified files should be automatically saved and by default DEVONthink doesn’t delete files on its own (only smart rules might do this). What kind of file(s) did you actually modify? Are they in the Finder’s trash?

Thank you for your attention
I haven’t seen bug report, so I suppose that I quit. These were webpages and some of them were converted to pdf. Also I reorganized some groups structure to that files, created and applied new tags. And I don’t see this reorganization now.
I don’t see this files in the Finder’s trash

Is a verification of the database (see File > Verify & Repair Database…) successful? Is anything in DEVONthink’s trash?

Verification and repair didn’t work. Nothing is on Devonthink trash.

And what kind of errors were reported according to the alert?

If I understand you correctly: Found 0 inconsistencies, 0 invalid filenames, 2 missing and 0 orphaned files.
(This 2 files are reported to be missing for some time - they are not the point of the problem)

And could you please explain me by the way how to empty trash without loosing files in the DtB or I need to write a new topic?
While starting to work in DT I didn’t properly understand how it works (and I still don’t). So a lot of deleted (moved to trash) tags contain valuable information. Probably some tags were moved to trash from undesirable places - so they are in the DtB and in the trash both. When I empty trash a lot of files from DtB are deleting (Despite I think it is quite counterintuitively - I expected, that files that are under the tags architecture and in the DtB in groups must be inviolable)
Is there any solution you could recommend? How to do this quick and properly. Probably there is a discussion about it, you could recommend? Probably there is a discussion with English text that is evaluated as simple English (or russian-speaking part of community)?

Thank you in advance!

You need to tend to the missing files. They are shown in Window > Log. See the Help > Documentation > Troubleshooting > Repairing a defective database > Missing Files section for more information on this.


Regarding emptying the Trash: As noted in the Help > Getting Started > Tagging section…

Applying tags: When you apply a tag to an item, a replicant of that item is created in the Tags section for the current database. For each tag you apply, you will have a replicant in each tag group. These are not the original items, but only instances of the items. If you delete a tag group, the group and the replicants it contains are removed. The original items in the database remain intact.

Good day and thanks for the insight into the tagging logic. In principle, I just understand this moment.
Unfortunately, this does not advance me at all in understanding how to empty the trash without losing data. And I’m losing data. Any archivist will argue about which is more important: the data itself or the way it is organized. It turns out that by emptying the trash, I lose metadata, which is much more important to me than the content of the database.
I would like to understand why this is happening in order to avoid it.
For example, I have a group of tags “Food Plants by Genus”. Before emptying the trash, there are 700 genera of plants in it, after 64. I attach the printscreens.
I would also like to know how to get the Database back correctly. Before emptying the trash, I made a backup to an external hard drive and disabled cloud sync. Will it be enough to just copy the Database from the external hard drive back to the DT folder?
Thank you in advance!