main
Michael Murtaugh 8 months ago
parent 97c5c973a1
commit 7f405a23ae

@ -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).
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:
calibredb add -r -1 --library-path=tmp/ Bootleg\ Library/
where tmp is a new directory...
NB: all the books that are found and added get an OPF file.
where tmp is a new directory...
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).
For this I used the script [add_missing_opf.py](scripts/add_missing_opf.py)
(3) Finally run
# 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)
# Finally ran
calibredb restore_database
Sources / Links

Loading…
Cancel
Save