Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 09:39 AM   #1
asw22
Junior Member
asw22 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2024
Device: PocketBook InkPad 3
Smile Unable to restore databasecalibre

Hello everyone!

An thanks to Kovid for this wonderful too that is Calibre!

I have been a Calibre user for about ten years (now 7.15/W11), and I manage about 45000 books, without too many issues...However the issues I have had recently are a bit strange:

1) on my main library, when I make a research via author or series, some books are missing for no reason...and yet they are in the library folder in their proper place, and so far (say one year ago) there was no issue...
So I tried to restore the database...same issue!

2) I made an experiment and duplicated the Calibre folder under another name via the export/import process using an intermediary folder...I obtain an exact duplicate of the original database, with the same books still not considered in the metadata.db

3) Having a full library to play with, I try to restore the database: this time the original database (75M) is "destroyed" (albeit saved) and replaced by a 5 book database or so (404K)!!! I try again, same thing!

4) I try a last test, and remove the metadata.db, hoping the restauration will force Calibre to recreate it via the books data in the Calibre folder (like it is supposed to do), thus allowing me to get all the books: no dice I still get the same small database!!!

What could happen?

Thanks for your lights!

asw22
asw22 is online now   Reply With Quote
Old Today, 10:42 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,169
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the check library tool to find all such problems and then you can re-add the books. Or if you just want to do it in bulk you can create a new empty library then use the add books -> add from folders -> one book per folder to recreate the library from your old library folder.
kovidgoyal is offline   Reply With Quote
Advert
Old Today, 11:28 AM   #3
asw22
Junior Member
asw22 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2024
Device: PocketBook InkPad 3
Thanks Kovid!

I am trying the first method but the results window (which shows all the types of issue!) is blocked (not responding). I guess this is due to the very large size of the library and I just need to be patient..

I will try the second method later when Calibre will have given me control on operations...
asw22 is online now   Reply With Quote
Old Today, 11:38 AM   #4
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 10,774
Karma: 226728226
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
You should also try to find out what has caused your database issues, to prevent them from happening again. Is your library on a cloud or a network drive? Have you added/deleted books directly from the library folder, without doing it via the calibre GUI? Those are the most common reasons for data corruption.

Last edited by Sirtel; Today at 12:30 PM. Reason: typo
Sirtel is online now   Reply With Quote
Old Today, 12:04 PM   #5
asw22
Junior Member
asw22 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2024
Device: PocketBook InkPad 3
I never added books in another way than via Calibre.

I did however get many duplicates (for various reasons, but often because Calibre did not show me all the books!), and I removed some via Calibre and others directly in the library, but always by removing the containing folder of the book.

For unfathomable reasons, I got myself many books without any format (about 10000 out of 50000) I am dumbfounded, to say the least!
asw22 is online now   Reply With Quote
Advert
Old Today, 12:27 PM   #6
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 10,774
Karma: 226728226
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by asw22 View Post
...and others directly in the library, but always by removing the containing folder of the book.
Never do that. The book entry remains in the database that way.

Any chance of cloud syncing? OneDrive, Google Drive, an automatic backup solution?
Sirtel is online now   Reply With Quote
Old Today, 12:36 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,157
Karma: 57532198
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by asw22 View Post
I never added books in another way than via Calibre.

I did however get many duplicates (for various reasons, but often because Calibre did not show me all the books!), and I removed some via Calibre and others directly in the library, but always by removing the containing folder of the book.

For unfathomable reasons, I got myself many books without any format (about 10000 out of 50000) I am dumbfounded, to say the least!
2-way SYNC software is the most likely cause.
You fix a title or Author and the sync puts the old one back. OR you use Google Drive (which damages the file name ) Do read the FAQ about NAS shares.
theducks is online now   Reply With Quote
Old Today, 01:14 PM   #8
asw22
Junior Member
asw22 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2024
Device: PocketBook InkPad 3
All what I have described is happening on the same NVE SSD (and other internal disks in the same computer). I don't use cloud or NAS.

I have done what Kovid suggested (create an empty library and filling it with the books of another one): this work fine except I los all the metadata painstakingly assembled/created from different sources (series, blurb...): this technique allows retrieval of the epub, but not the opf!
How can I fix that? I would have 45000 sets of metadata to retrieve and adjust...

PS I am playing with copies, the original library is intact!
asw22 is online now   Reply With Quote
Old Today, 01:26 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,257
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by asw22 View Post
All what I have described is happening on the same NVE SSD (and other internal disks in the same computer). I don't use cloud or NAS.

I have done what Kovid suggested (create an empty library and filling it with the books of another one): this work fine except I los all the metadata painstakingly assembled/created from different sources (series, blurb...): this technique allows retrieval of the epub, but not the opf!
How can I fix that? I would have 45000 sets of metadata to retrieve and adjust...

PS I am playing with copies, the original library is intact!
Select the original library. In the toolbar lick on the library icon. Then select Restore Database. That will build a new database from your eBooks in the library. I'm not sure if the option to check the library comes up after that. If it does, do it. If not, select Library maintenance and check the library.
JSWolf is offline   Reply With Quote
Reply

Tags
calibre, restore database


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to restore backup from Google drive in Moonreader pro due to blocked access archz2 Android Devices 0 05-12-2024 11:32 AM
iPhone 7 unable to restore Error 4013 Dean11 Apple Devices 1 10-23-2018 01:09 PM
version 3.15.0: unable to 'restore' database BuPunkt Library Management 4 01-18-2018 08:45 AM


All times are GMT -4. The time now is 04:33 PM.


MobileRead.com is a privately owned, operated and funded community.