Quote:
Originally Posted by Adoby
Wouldn't that cause metadata in previous custom columns to disappear, if the random db doesn’t have the exact same custom columns as what was stored in the opf-files?
It could be a good idea to test it, but make sure to have a backup of the corrupt library, if it seems that a complete restore of all metadata fails.
It assume it should be possible to examine a opf-file to find out what custom columns was used when the opf-file was created?
|
Excellent point about the backup.

I think it should be all right -- the db "should" only update the backup json and opf's if changes are performed. But better safe than sorry.
By definition, the restore database function is supposed to completely trash the db and restore all info whatsoever from the backups. book metadata is stored in the opf, and the metadata_db_prefs_backup.json contains ALL other data saved in the db -- it is supposed to ensure that by combining the json with the opf's, all the data is saved by which the db can be restored literally from nonexistence. As is indeed the case here.
TL;DR The custom columns are created from metadata_db_prefs_backup.json, and given values, if available (and they had better be), from the opf.