Quote:
Originally Posted by davidfor
That was what I was doing when I noticed modified time changing. I was thinking it didn't change, but it did this time.
|
My bad. It does change the time. The advantage is that it doesn't force a calibre restart
Quote:
The only problem with that is that the only time I needed to restore from the backup OPF files, it didn't restore the custom columns. This was for my wife's library and she only had one or two custom columns that didn't have much in them. I've been meaning to look at what went wrong, but I did follow the instructions in https://manual.calibre-ebook.com/faq...libre-is-blank. (OK, I did what I thought should work and then read the manual.) Or have I misunderstood what should happen?
|
It is supposed to work, and does work in my tests.
The only failure mode that I can think of that would cause the loss of custom columns is if the metadata_db_prefs_backup.json file is corrupt, missing the custom column definitions. If the entire file is missing then the column metadata is rebuilt from the OPF files. If "field_metadata" JSON inside the file is missing then the same thing happens. However, if the field_metadata field is there but missing the custom column metadata then the columns are lost.
Quote:
From my point of view, if I add an extra column, then the backup OPF doesn't need to be updated until I populate it with a value. And the library backup status dialog has a button to "Queue all books for backup". Isn't it a matter of triggering that whenever a change is made? Except that it appears to work by changing the modified date for all books (ouch). But, it also appears to work based on the contents of the table "metadata_dirtied". I'm assuming that an entry is added to that table whenever book is modified. Finding another way to populate that after a custom column change, or pressing that button above should do what is desired. I'm sure it won't be as simple as that, but, it will be interesting to see what is needed.
|
The goal was to ensure that the OPF file contains the column definitions. Values in the file aren't used except for composite column templates.