Rebuild database

Hello,

I’m new to DEVONthink, and am playing with it for just a couple of days.
I indexed lots of files into a database. Then I deleted many of these indexed files externally. However, DEVONthink seems still try to sync these files. I noticed a few times that DEVONthink was syncing files, and last for a long time for some files. Then I found out that those are the files that I’ve removed externally. In the database, they are still there, and only when I click them, they disappear. I then click rebuild database. It is still running, but I find that the database file is huge. The size does look like that it contains all the files. So my questions are:

  1. how should one repair the database after indexed files are removed externally? I clicked optimize database (other options except for rebuild are gray), but it does not seem to solve the problem.
  2. Does rebuilding database transfer indexed files to imported files? Otherwise, why is the database file so huge?

Thank you.

1 Like

Welcome @uni

1. how should one repair the database after indexed files are removed externally? I clicked optimize database (other options except for rebuild are gray), but it does not seem to solve the problem.

Open Window > Activity and cancel the sync. Then go into the Preferences > Sync and disable the syncing.
You don’t need to repair the database after removing indexed files. You need to update the database.

What did you index?
Did you read the Help > DEVONthink 3 Help > Documentation > In & Out > Importing & Indexing? If not, please do so and understand the relationship between DEVONthink and the filesystem. Indexing is not the default behavior for a reason.

2. Does rebuilding database transfer indexed files to imported files?

No. However, it removes references to missing files.

Otherwise, why is the database file so huge?

Where are you seeing this information showing it’s huge?

Thanks a lot for the quick reply and the references. I will check them.
I found the dtBase2 files in the Databases folder. I indexed about 15 GB files, but the corresponding dtBase2 file is about 20 GB.
Is this the right behavior?

You’re welcome!

No, that doesn’t sound correct.
Where are you seeing these numbers?

In Users/username/Databases, where I can find two dtBase2 files with the names of my databases. The other one has a size of 90 MB, and the indexed files are about 620 MB, which looks quite ok.
I just now deleted that huge database, clean Database from sync, and will try to make a clean one from the beginning.But it seems that I did not gain back the full 20 GB storage in my Mac after cleaning the Trash. The storage increased by only about 7 GB.

Edit: I restarted Mac, and then the full 20 GB storage was back.

What kind of sync are you doing?

I tried both iCloud (CloudKit) and Bonjour (first tried webDav, but it seemed blocked at some point)