@ -40,14 +40,19 @@ I tried this, and Calibre couldn't find a file needed to regenerate the database
Restoring with calibre was tricky as the library rebuilding tools (calibredb restore_database) and also using Calibre's graphical interface to restore a library, both only found those books that had an OPF file. Unfortunately, it seems that the OPF file isn't automatically created when books are added (and perhaps not edited) in calibre-web. SO... it's possible to use calibredb's add command to re-add all the books back and rebuild everything. BUT, the downside here is that all the the books will get renumbered and thus break all existing links (which feels like a big pity as someone who likes to link to specific books / pages).
Restoring with calibre was tricky as the library rebuilding tools (calibredb restore_database) and also using Calibre's graphical interface to restore a library, both only found those books that had an OPF file. Unfortunately, it seems that the OPF file isn't automatically created when books are added (and perhaps not edited) in calibre-web. SO... it's possible to use calibredb's add command to re-add all the books back and rebuild everything. BUT, the downside here is that all the the books will get renumbered and thus break all existing links (which feels like a big pity as someone who likes to link to specific books / pages).
SO what I am doing is:
SO what I am doing is:
(1) Locally on my laptop, I rebuild a new library with:
# Locally on my laptop, I rebuild a new library with:
NB: all the books that are found and added get an OPF file.
NB: all the books that are found and added get an OPF file.
(2) Copy the OPF file from the newly generated library, into the old library for books that have no OPF file already. In doing this, REWRITE the OPF calibre_id to match the old ID (which is in the folder name).
# Copy the OPF file from the newly generated library, into the old library for books that have no OPF file already. In doing this, REWRITE the OPF calibre_id to match the old ID (which is in the folder name).
For this I used the script [add_missing_opf.py](scripts/add_missing_opf.py)
For this I used the script [add_missing_opf.py](scripts/add_missing_opf.py)