![]() |
#1 |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
Corrupted Database
Couple of days ago, Calibre shut down without warning and when I re-opened it, I got a corrupted database message. I was able to successfully restore the database but I have noticed something weird.
When I click on a specific title within Calibre, the are no formats showing. I typically keep both mobi and epub for all of my books. When I click on the path and it opens the Calibre folder for that specific book, I see both formats along with a cover.jpg and metadata.opf file which is what I would expect. Why if the files exist in the folder are they not showing in Calibre? I hope this question makes sense and more importantly, how do I get the formats to show back up in the database? I hope someone tells me that I don't have do each and every file individually because if I do - well that is definitely going to take some time. One final question: is there a limit to the number of books one can have in Calibre? Is there some threshold or ceiling at which this database starts to go crazy? Just wanted to check. |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Database which is why things go wonkers if you delete formats using the OS. The DB still has them listed. If you select a title: Can you Tap 'O' and does the folder show the book (all formats,cover and OPF)? |
|
![]() |
![]() |
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,791
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
Quote:
@chilady1 try the library maintenance check library and see if it throws up any errors. You should be able to fix most of them. |
|
![]() |
![]() |
![]() |
#4 | |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
|
There are three main ways to get problems with the calibre library.
1. Operator error, that is to access and do changes to the library directly instead of via the GUI. This includes overwriting the current library or database with a previous backup, instead of fully replacing the library from the backup. Even very minor changes to a filename means that calibre loses track of the book format. 2. Operating and filsystem differences. For instance Linux cares about the case of characters in filenames and paths, Windows doesn't. If you move a calibre library between two operating systems bad things can happen, typically exactly like you described it. Differences in case of the letters in the filename is another example of minor differences that makes calibre lose track of book formats. 3. Hardware and filsystem corruption. All harddrives fail if you use them long enough. Also it is not safe to store the calibre library on a networked drive. You didn't provide enough information to decide which one is most likely, but perhaps 3 followed by 1? Some of these problems can be fixed using the filesystem tools in your operating system, in combination with the calibre library maintenance tools. If that doesn't work, then you may have to restore the most recent backup of your valuable library and manually add all the books you added since then. Also redo any other changes. http://manual.calibre-ebook.com/gui.html#library All errors that are indicated by the calibre library maintenance tools should be fixed. Last edited by Adoby; 11-08-2013 at 12:59 AM. |
![]() |
![]() |
![]() |
#6 |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
I really appreciate all the good advice offered here but again, is there anyway to get the books so the formats show in Calibre without having to do this one at a time?
|
![]() |
![]() |
![]() |
#7 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
|
Yes. It could be possible if the library maintenance tools successfully discovers the "missing" formats and offers to add them to the library. However, you may end up with duplicate book records. It depends on what the original cause was and how serious it is. You may also end up with books, formsts or metadata missing from the library.
Could be prudent to restore a backup and compare the number of books to see if any are missing. Last edited by Adoby; 11-08-2013 at 06:04 PM. |
![]() |
![]() |
![]() |
#8 | |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
Quote:
Thanks! |
|
![]() |
![]() |
![]() |
#9 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,637
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@chilady1 - I think that metadata_pre_restore.db file was created when you ran the Library Maintenance->Restore database function as per your original post.
Quote:
Aside : If this happened to me then I would consider 'severing' the Dropbox link and re-establishing it when I had a pristine clean local library. I can't give you any precise advice on that because I don't use Dropbox. BR Last edited by BetterRed; 11-09-2013 at 01:05 AM. Reason: typo |
|
![]() |
![]() |
![]() |
#10 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
|
I suspect that the use of Dropbox is the cause of the corrupt database.
To avoid problems you must allow Dropbox to fully sync before you start calibre and after you exit calibre, before you shut down the computer. And of course you should not run calibre on more than one computer simultaneously, if they use the same shared calibre library. Last edited by Adoby; 11-08-2013 at 10:14 PM. |
![]() |
![]() |
![]() |
#11 |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
So here's what I had to do, not pretty but better than going through my entire Calibre db one author at a time.
I have restored the last known "good" Calibre db from November 5th from Time Machine. My system didn't go crazy until the 6th. I did look at the books and I noticed that many of my very early books have multiple epub copies, so once the database is restored, I will go in a do what many have suggested which is run the Quality Check plug-in for a number of items. For example, I will have an author twice in Calibre that looks like this: Smith, Jane Smith_Jane I noticed that the Quality Check plug-in finds those folders without commas, etc. I really think this boils down to a lack of db maintenance on my part. I thank EVERYONE for some very good suggestions and will let you know how things turn out. |
![]() |
![]() |
![]() |
#12 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The DB is just 1/2 of the Database. The other half is the FOLDERS (and contents) They are a Siamese (sneaked my cat in there ![]() Rename an Author and the folder that contains that book changes Rename the Title and the Folder for THAT changes Add a format (also by conversion) and there is a DB entry for even that. This is why we keep harping on 'Don't make ANY changes using the OS' 1 tiny case mismatch and it is a broken ![]() |
|
![]() |
![]() |
![]() |
#13 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Try creating a new empty library and importing all your books, using:
Add books ==> Add books from directories, including subdirectories (one book per directory, assumes every ebook file is the same book in a different format) This will fix any problems with moved records that the multiple versions of the database can't keep track of. It should also only import one epub per record, and list all multiples with an option to either add or ignore. All metadata changes will be read from the metadata.opf not the files. I use this if I didn't save to disk on linux but want to import into Windows anyway -- a library is basically a save-to-disk backup except that its a REALLY bad idea to touch with your ten-foot-pole -- it's very handy. Granted, you will have to re-import all your books, but it can do that without your input while you do something else. Also, if you have custom columns, use "copy structure from existing library" when creating the new library, so the import will save all your custom metadata. Then, if you like the results, you can delete the old library. |
![]() |
![]() |
![]() |
#14 |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
Thanks - I was able to successfully restore my Calibre library from 11/4 from Time Machine and now I am in the process of doing some very overdue library maintenance. I really appreciate all of the suggestions here. I am breathing again - WHEW!
|
![]() |
![]() |
![]() |
#15 | |
I devour books!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 789
Karma: 1285226
Join Date: Mar 2009
Device: iPad Air, Kindle 3/Kobo Aura HD, iPhone 6
|
Quote:
NOTE: I have found the Quality Check plug-in takes care of the above, it finds duplicate author folders and consolidates them and uses the new naming convention with a comma not the underscore _. Last edited by chilady1; 11-10-2013 at 01:22 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Corrupted database | Qylie | Calibre | 8 | 08-28-2014 02:02 AM |
The SONY database is corrupted | tetanos | Devices | 10 | 09-22-2013 04:39 AM |
Help! Corrupted database problem | Marok | Library Management | 12 | 06-24-2013 09:01 AM |
Corrupted database | garyft | Calibre | 3 | 05-13-2011 02:10 PM |
Grrr... Corrupted Database | PeterT | Kobo Reader | 4 | 01-09-2011 10:36 PM |