Corruption - repair or restore from backup


I recently got a corruption msg from DEVONThink. I restored from a 2 day old backup; that seemed like the easiest thing to do. It would have been nice if at the same time it could figure out what items were not part of the backup and then try to repair and add those to the backup.

If you open the damaged databased again (should be still possible as “Restore Backup” doesn’t wipe out databases, it’s just switching the current database and the selected backup), just use the History to check which items have been added/modified during the last two days.

In addition, please use Tools > Verify & Repair to ensure that the backup is fine.

Would I open the damaged database using the File | Open Database command? That seems to be the only one applicable after I’ve restored from a backup.

Luckly, I think I’ve only added a few items in the past few days and I think I remember what they were. In any case, the process seems to be more complicated than it could be. :slight_smile:

As Christian noted, the Restore Backup command is reversible. When you ran Restore Backup the then-current contents of your database were moved into the most recent (two day old) Backup Folder, and the previous contents of the Backup folder became your current database.

You should now run Tools > Verify & Repair to check that the restored database is sound. If so, do this:

You can restore your database to its previous state by running Restore Backup once more. Then, as Christian suggested, select Tools > History to display the recently added contents. Simply select the items that were added in the time period of interest (say, 2 days old) and export them.

Now run Restore Backup once more. You’ve reverted to the 2-days-previous and uncorrupted state of your database.

At this point you can try to import the contents you had just exported. If any of them were corrupted files DT Pro will reject them, and you can see in the Log file which ones were “lost”. And I would run Tools > Verify & Repair once more, just in case DT Pro may have swallowed and then choked on a problematic file.

That’s probably the simplest set of procedures that gives you flexibility to address problems and allows you discretion in correcting problems.

The fact that Restore Backup is a reversible operation provides latitude to analyze and correct problems.

BTW, I recommend running Verify & Repair followed (if no problem) by Backup & Optimize manually whenever one has invested time and effort in modifying the database significantly. That can be triggered at a break time and assures one that there a very recent good backup.