Quote:
Originally Posted by Adoby
It is overwhelmingly more likely that it is some form of user error that caused calibre to loose track of books, than it is a bug or error in calibre that is the cause.
Somehow files in the calibre library has been updated, renamed, restored or otherwise changed in a way that made the database metadata.db out of sync with the books stored in the library. The paths and the names stored in metadata.db don't match the actual files. This is discovered only when calibre attempts to do something with the books. So there may very well be a very long time span between the error that caused the problem and the discovery of the problem. That is why it is good to run the database maintenance tools now and then, especially after the library has been updated or changed using any other tools than the GUI.
Possible causes are partial restores of backups, overwriting one library with another. Perhaps a restore of an old metadata.db without replacement of the books. Or a partial restore of book files from backups. Copying the library between different operating systems and/or filesystems that have different case sensitivity. Or using some utilities that updated files or paths in the library.
When calibre is backed up and restored it should be handled as a single monolithic entity. Never partially restored or restored over an existing library.
The problems should hopefully be easy to fix by running the calibre maintenance tools, using the GUI to copy the entire library to a new library, and manually add the books left behind in the old library to the new library. But metadata may be lost.
Please note that the problem will most likely come back again and again, if the assumption is that calibre was the cause. The same user error will then most likely be repeated again. So do try to figure out the actual cause.
|
You didn't read my post.
It's not that Calibre lost the filepaths. It's that Calibre has lost the files themselves. The book file is gone. I know how to fix Calibre losing the filepaths. What I don't know is how to stop Calibre from unpredictably deleting the book files themselves.
Also, I ran all the Library Check tools, which found nothing wrong.
The book was there in Library A, I picked 'Copy to Library B, delete after moving', then looked for it the next day and it wasn't in any of my libraries. So I'm pretty sure it was something Calibre did, probably when it copied the book over.
The most logical idea seems to me to be that somehow the copying went wrong, Calibre didn't realize that, and then deleted the copy from Library A like normal. This would fit the observed behavior so far. I'm not sure how to reproduce it, though. The book in question was one of many books that was copied over at the same time, and the rest seem to have made it through alright.
Until this is figured out I'm setting up a backup folder structure that will be my actual library. It's less convenient, but a library that unpredictably deletes files is a library I can't rely on. I'm also setting up a whole new portable Calibre installation, in case it was just something about my old installation.