Database size won't shrink in finder after deleting files

hello everybody,

I’m Tim and I’m new to devonthink but I really like it.

after setting up an encrypted database with a size limit of 10gb I added several documents (pdfs and jpgs) and the database was approx. 20 mb large in devonthink under database settings and in finder the database file was like 100 mb. after deleting all files database size in devonthink is 0mb and in finder it won’t change or shrink down what I expected.

my questions are:

  • why does the database won’t shrink down in finder?
  • which information about the size of the database is relevant in terms of size limitation in general for the encrypted database? is it the database size in devonthink OR in finder?

thanks for you help guys.

Encrypted databases are based on sparse images which usually just grow (up to the specified maximal size). You could open a support ticket and @bluefrog will send you a script to handle this.

1 Like

so that means, that the size for the database shown inside of devonthink is not the one to monitor but the one shown in finder is relevant if I don’t want devonthink to hit my size limit for the encrypted database?

what will this script do to the database?

thanks!

File > Database Properties shows the available space in case of encrypted databases, the Finder’s values are not accurate.

That’s a question for @bluefrog

1 Like

The script removes deleted data and reclaims the space.

that sounds great. do I need to open a support ticket? and is there anything to keep in mind or pay attention to when using the script?

Yes, please open a support ticket and no there’s nothing much to consider.

1 Like

perfect, will open the ticket immediately.

three more questions:

  1. I’m a little bit confused since I’m syncing my database also to iCloud using iCloud kit but I do also have a local copy of it. is it true, that there is one database saved locally which is synced to iCloud?

  2. can I use the script when syncing to iCloud via iCloud kit?

  3. my basic backup strategy would be to save my database locally on different external drives via “export” - “database archive”. this is the way to go, also if I sync to iCloud, right?

thanks for helping

Synching is not a backup. You sync up to CloudKit to make the sync file, a special file only readable by DEVONthink, available to other devices. All DEVONthink databases are local and the data at the sync location is not another copy.

There is no need to write a script to sync. Synching is automatic once setup.

For backup, rely upon:

  • System backups, e.g. TimeMachine or other
  • Make archive backups (zip files) of databases that you store somewhere that can backed up by TimeMachine or if you want put somewhere else.

See the outstanding DEVONthink Manual for section “A Word about Backups”.

2 Likes

thanks @rmschne. the script I was talking about was from @BLUEFROG to free up some space in the database file, after deleting various files in the database.

again thank you guys for you help. you made one more happy devonthink user!

2 Likes

There is no “copy of your database in iCloud”. There are only local copies on each device. In the sync location is only raw, chunked, and optionally encrypted data.

1 Like

got it, thanks for clearing things up and making me understanding the software even better.

You’re welcome :slight_smile:

Dears,

my concern differs a bit from that of the thread opener but my headline would read the same, so maybe it’s a good idea to take this up? If no, please let me know. I’ll start anew or you’ll put it elsewhere.

Now, here: From a large database (some 58GB), from which I deleted 35GB. In Finder, the .dtbase2 file remains of the same size. Verify, Repair, Optimize didn’t change that. I found nothing really on it, neither in the manual, nor in take control, nor here (please point and forgive me if there is something).

Thanks!

Did you delete imported or indexed items? Indexed items don’t affect the size of the .dtBase2 package.

Hello Grunenberg,

I deleted imported items, and looking at the files still in the database, they should in sum be some 23GB as calculated. I could have a look into the database as package if that would help?

And you emptied the DT trash?

In Finder, the .dtbase2 file remains of the same size.

As has been discussed before, the size of a database in File > Database Properties is not the same as the size of the database file in the Finder.

The database in the Finder contains more than just your files. It also includes metadata and the searchable indices for the database. That can take plenty of space, especially if a database has a lot of textual content in it.
Also, and a very likely contributor, there are two rotating backups inside the database allowing you to roll back the metadata up to two weeks ago.

Here, the current metadata and backup metadata comprise ~1GB of this 3.3GB database…

So I would find nothing surprising about your current situation with such a massive amount of data in play.

And yes, did you empty the database’s Trash?

Hello chrillek and bluefrog,

I did emtpy the trash, yes, both within DEVONthink and Finder (and also, as mentioned, verified, repaired, optimized), however, upon opening the .dtbase2 in Finder (thus looking inside the package), I find a Trash folder of 42GB in size, although the Trash in Dt’s side bar proves empty. I know not why. Of backup folders on the other hand there is but one, and it is light. Should I delete the Trash folder’s contents, or need I know why it fills without showing in the application?

Thanks!

You are reporting unusual behavior here. Hold the Option key and choose Help > Report bug to start a support ticket so we can inspect the logs. Thanks!