Database repair and file inconsistency, circular dependency?

Hi,

Something went wrong with (I think a backup was interrupted unexpectedly somehow, but not sure if it is the root cause).
Anyway now my backup seems to be stuck in a chicken-and-egg problem (after attempting a Delete and Repair of the database).
“Repair” or recreating the database fails with:
Found inconsistency in the following files while validating database: /etc/ImageMagick-6/mime.xml, actual size 134171, dbsize 0, blocksetid: 1579 /etc/apparmor.d/cache/sbin.dhclient, actual size 115444, dbsize 0, blocksetid: 1907 /etc/apparmor.d/cache/usr.bin.evince, actual size 691867, dbsize 0, blocksetid: 1909 /etc/apparmor.d/cache/usr.bin.webbrowser-app, actual size 199842, dbsize 0, blocksetid: 1915 /etc/apparmor.d/cache/usr.lib.telepathy, actual size 225456, dbsize 0, blocksetid: 1919 ... and 2278 more. Run repair to fix it.

Trying to run any other command, such as list-broken-files fails with the error:
"Cannot continue because the database is marked as being under repair, but does not have broken files. Return code: 100"

Trying to run “repair” results in:
The database is marked as "in-progress" and may be incomplete.

The database was attempted repaired, but the repair did not complete. This database may be incomplete and the repair process is not allowed to alter remote files as that could result in data loss.

Is there any way to get out of this loop?

I’m afraid that’s a question for somebody like @kenkendk who has more knowledge of the database side.

Looking at the output, it appears that there is some remote data missing. This would explain why some files have a length, but the data in the database is missing, giving length=0.

Normally, purge-broken-files could be used to fix it, but since the database was recreated, it is flagged as “incomplete” which prevents it from running.

Do you know what the original error messages were like? I am guessing they were something like “missing remote files”.

If my hunch is correct, you should be able to get it working by deleting the newest dlist file and then running the delete+repair cycle (don’t delete the file, just rename it, or copy it somewhere safe in case I am wrong).

Otherwise, I suggest just setting up a new backup to a new folder and continuing from there. If you need to extract files from the broken backup, you can use the RecoveryTool to get the data out.

1 Like