View Single Post
Old 09-21-2010, 09:31 AM   #12
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dwanthny View Post
I'm confused. How will restoring just the metadata.db make things much much worse? It will create blank folders with no books but it won't cause any folders to go poof, will it?
No, calibre won't create blank folders.

Assume that I change an author from Joe to John. Calibre will change the metadata in the db, then rename the folder 'Joe' to 'John'.

Now I restore the db from before. It thinks that the author is Joe, and that the folder is 'Joe'. Unfortunately, the folder 'Joe' does not exist, which is something that is not supposed to happen. In addition, the folder 'John' is sitting out in space, loved by no one.
Quote:
Running a database integrity check at this point will point out any mismatches and you can manually search for the missing items or re-add those items via the metadata edit window.
Yes, you can recover this way.

If you are careful, before running db integrity you can manually change the authors back to what they were, and the floating-in-space folders will be found and used. This must be done before calibre notices that the folders are missing and changes the db.

The reason it is 'much much worse' is that restoring a db can have catastrophic unintended consequences. For example, assume a user did something to tags that s/he didn't like. Perhaps all of them were turned to the letter Z or some such, it doesn't matter. In the same operation, the user changed the authors of the selected books on the first screen (yes, this is possible). Noticing the bad tags, the user says 'Hey, it made a backup' and restores it. At this point the tags are made right but all the formats are are made gone. Ouch.
chaley is offline   Reply With Quote