View Single Post
Old 01-06-2014, 10:33 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Adoby View Post
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.
eschwartz is offline   Reply With Quote