View Single Post
Old 06-02-2013, 07:43 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,759
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@jgt1942 - When I've inadvertently deleted some books I've found that the way to recover them is to either go to my backup, or proceed as follows
  1. Restore the deleted book folders back to where they were, using normal OS (Windows, OS/X, Linux) facilities
  2. In Calibre right click the "Library" icon and select Library maintenance->Restore database
This should add the restored books back into the calibre database, and the book count should go up accordingly - and your books should be accessible in Calibre.

Brief explanation

The 'heart, body and soul' of Calibre is a relational database, there's one for every library - its named «metadata.db».

Calibre does not store the actual books its database (i.e. the epubs, pdfs etc) only the data about the books - i.e. the metadata. The actual books (format files) are stored in the author/book folders

And, in each book folder there is always a file called «metadata.opf». This is a copy of what's in the database for the book. The sole purpose (I think) of these files is to enable the database to be rebuilt.

And that's what the Restore Database does - rebuilds the main database «metadata.db» from the «metadata.opf» files inside each book folder

Hope this helps

Cheers BR
BetterRed is offline   Reply With Quote