Deleting hosts backup_server_files.db remain same size


I have a server with 80+ hosts. In last 2 months i migrated many of them to others UrBackup servers for more reliability cause backup_server_files.dd size.
I have deleted like 55 hosts now and the backup_server_files.db is always 56gb like with 80 hosts.
Night procedure deleted completely files in the data directory but seems not deleted all hash in DB related to them. I need to reduce the db to reflex the actually hosts present.

I try remove-unknown with no success. Not seems delete the entries in DB of hosts anymore existing. With defrag-database/repair-database 2 months ago the database became corrupted and i lost 15gg of backups cause have to recover an old copy of it.

Hope to have explained the problem clearly

Defrag database would shrink the database. If you think that corrupts databases, please report the problem including relevant information so it can get fixed.

Thanks for the answer.
I wait the remove-unknown actually working and i retry with a copy of the db.

In meantime i’ve exported a copy of the DB to another file with sqlite3 .dump function and reimported. Now is 14gb. Your defrag function basically should do similar thing?

The repair does this, the defrag does a VACUUM (which also creates a whole copy then replaces the db with that)

OK! I got it. I’ll try again. Maybe I was just unlucky when he got corrupt.

@uroni could it be that for doing a successfull defrag of the db you need at least x2 the actual free size of the file for doing that initial copy? That is maybe why @MessaUfficio db got corrupted.

That would show up in the log/as message. And it obviously shouldn’t corrupt it (Since it creates a copy it can just discard the copy and that’s it).