View Single Post
Old 07-06-2022, 06:52 PM   #11
ygreq
Enthusiast
ygreq began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2010
Device: iphone
Quote:
Originally Posted by BetterRed View Post
perhaps a Library Closed plugin could copy the metadata.db file of the library just closed to a metadata.db.backup fiie within the library folder, doing a replace of it already exists.

I say 'perhaps' because I don't know if LC plugins can have an event that kicks in when the metadata.db file is actually closed. The existing LC plugins operate on the content of the database (Virtual Library and Custom Column definitions) before its closed.

Recovery would be manual: Close calibre and copy metadata.db.backup to metadata.db, then run the calibredb check_library command and fix errors, OR start calibre, run Library Maintenance->Check library and fix errors.

BR
Interesting approach. But what if the fail happens while you are using calibre. For example the only fails I got was while using calibre. So I would still rather go with a metadata.db backup every n minute. And keep about 3 backups. And if shit happens, you just delete the old metadata.db file and rename the last backup. And see the folder structure of the entir elibrary and just re-add the last books you were trying to add or see which books were last modified to redo them.
ygreq is offline   Reply With Quote