Can't repair database

Hi folks,
I’ve found similar (but usually unresolved) issues elsewhere so forgive the overlap with other threads. I have a database that is years old and has come through all the versions of DV and DV to go since 2016. I’m currently running 3.6.3 on the Mac.
I’m trying to move to iCloudKit and doing one at a time. This one reports ‘Failed database verification, please repair the database.’
Repair does not solve it, I get ‘1 inconsistency’. The log does not tell me where it is as it does with other errors so I have no idea where it is in the database. I tried rebuilding it, but it didn’t solve the problem.
It last synced successfully in Feb (I use it erratically). Annoyingly, because I rebuilt it, I can’t now look for whatever I added since then as everything reports it was added just now;)

If I did add something, it will be important so I’m loathe to chuck this away and redownload from the cloud (legacy).
This database syncs with my iPhone and iPad too on whatever the latest version is (auto-update, and I went to DTG 3 fairly soon after it was released).
Any suggestions? All help gratefully received…
cheers,
Jason

This has been reported several times on the forums, but here’s the basic steps…

  1. Clear Window > Log.
  2. Do a File > Verify & Repair on the database.
  3. Press Repair when prompted.
  4. Press Ok in the next dialog.
  5. Check Window > Log for zero-byte files.
  6. Control-click a result and choose Reveal if you’d like to see where the file resides in the database. Then use the Move to Trash option.
  7. Empty the database’s Trash to remove the zero-byte files.
  8. Repeat the steps with other databases as needed.

Thanks. What I was missing was having the log open already as it wasn’t showing until I did that.

No problem.

Digging up an older thread on this. After an OS crash a few days ago I had 11 files that were showing missing. Going through re-indexing brought it down to 10 files. The remaining 10 missing files all have the same behavior as far as I can tell. They show that the file is missing, but the preview works fine, the file shows as being it’s original size, it opens in both DEVONThink and external apps, and the path to the source file shows the file in place and opens from that location as well.

What am I missing?

Welcome @GaiusRufus

it opens in both DEVONThink and external apps, and the path to the source file shows the file in place and opens from that location as well.

This would be inconsistent with the file being missing.
Hold the Option key and choose Help > Report bug to start a support ticket.

I have a similar issue but when I repair the database, it tells me there is one failure but does not list in the log window where the failure is.

Welcome @twilhelm

Clear the Log window and run a File > Verify & Repair on the database. What is reported?

Nothing is displayed in the log window after running repair. That’s the problem I’m running into. I don’t know what the problem was because it’s not logged.

A screenshot of the alert would be helpful, thanks.

1 Like

I have a similar issue after a power outage. I do…
File > Verify & Repair.
DT tells me “Found 1 inconsistencies, 0 invalid filenames, 0 missing and 0 orphaned files.” with Ignore or Repair. I select Repair.
DT tells me “Repair failed. 1 errors left” I select OK.
Window > Log says “Failed database verification, please repair the database.”

I’m not sure where to go from here. Please help since DT won’t sync with DTTG with this problem.

Thanks.

2 Likes

What I’ve done in the past at this point is to do a “rebuild” of the database.

For more complete guidance, see the DEVONthink Handbook (3.7.2 version), page 182 “Repairing Defective Database”.

OK thanks. Are there any consequences to doing a rebuild? eg does the Date Added for documents get reset to the date the rebuild is done.

Off hand, I don’t know. If concerned, then this might be something covered in the DEVONthink Handbook (same content as in DEVONthink Help). If not specific enough for you, then perhaps do an experiment. Create a new database. Put stuff into it. Take note of the Date Added field, then rebuild and compare.

This isn’t something that I ever concerned myself with as the key dates, if needed, are 99% of the time inside the contents of the document. More reliable and accurate than meta data, if dates info critical.

No, rebuilding retains all (custom) metadata if possible.

Thanks. I tried to upload 3 images but since I am a new user, I was limited to one image.

Try this…

  1. Clear Window > Log.
  2. Do a File > Verify & Repair on the database.
  3. Press Repair when prompted.
  4. Press Ok in the next dialog.
  5. Check Window > Log for zero-byte files.
  6. Control-click a result and choose Reveal if you’d like to see where the file resides in the database. Then use the Move to Trash option.
  7. Empty the database’s Trash to remove the zero-byte files.
  8. Repeat the steps with other databases as needed.

Thank you for the response. I had already seen this advice on other threads and tried it. But I think the key part is that there are no results in the log window for me to Control-click on. The popup dialog says Repair Failed with “1 errors left.” but nothing in the log window to indicate what the error was.

I did try to rebuild the database and that may have helped.

So you clicked Repair, it stated the repair failed, then what?
Did you check the Log window again? (Hint: you should have) :wink: