07-25-2010, 01:18 AM | #1 |
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
Corrupted Metadata
My calibre metadata file somehow became corrupted and now my library is all screwed up according to calibre, but all the books are actually there. For most of the books it thinks there isn't an associated file.
Is there a way to fix this, other than rebuilding it from scratch? That would make me want to cry because I'm using 3 readers at the moment and I would lose the data about which book is on each reader. Thanks, Marcy |
07-25-2010, 01:21 AM | #2 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Lacking this try Preferences - Advance - check database integrity. |
|
Advert | |
|
07-25-2010, 01:23 AM | #3 |
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
No good. The recent backup seems screwed up as well.
-Marcy |
07-25-2010, 02:10 AM | #4 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
07-25-2010, 02:15 AM | #5 |
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
Yeah, I did that after moving my library. That's what caused the corruption in the first place.
I need some way to reattach my books to my database entries. I can't bear the thought of starting from scratch—I have too many things customized that I would never get back. -Marcy |
Advert | |
|
07-25-2010, 02:24 AM | #6 |
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
If it helps at all, every time I tell calibre to "open containing folder" a new empty folder appears with a new number.
For example I have a folder Calibre Library > Chris Nicholson > The Elephant Keeper (1299) but if I select The Elephant Keeper and choose "open location" a new folder is created: Calibre Library > Chris Nicholson > The Elephant Keeper (1892) Is there a way I can link my books back properly? So, I guess what I'm asking is, is there a way for me to edit the metadata.db file to give all the books their proper numbers. I'd rather do that for 1700+ books that have to reimport them and re-edit all their metadata by hand. Thanks, Marcy Last edited by Marcy; 07-25-2010 at 02:32 AM. |
07-25-2010, 03:12 AM | #7 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
What version of calibre are you using?
Copy your backup library to a new directory and point calibre to this new directory. |
07-25-2010, 08:42 AM | #8 | ||||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Quote:
Quote:
First, confirm what I wrote above (that the empty 1892 folder already exists.) I'm 95% certain, but doublecheck. Next, check to see if you have the 1299 entry in your GUI main screen. I'm pretty sure from your post that you don't, but just make sure by doing a search or manually looking through to make sure you do not have these records at the bottom of your listing. Third, I'm assuming that you have good metadata in the empty 1892 record, but no formats in that record. Also, assuming you do not still have the old entries (checked in step 2), open the 1299 folder (with a file explorer outside Calibre) and drag the book format files in it into Calibre's GUI. This will create a third book id (lets say 1300), but without metadata. Last, select both of 1299 (good metadata, no book formats) and 1300 (book formats, but no metadata) and choose the Edit Metadata, Merge-delete others to merge the two and keep your good metadata. (Preferably, select 1299 first, but it doesn't matter a lot.) If you want, you can simply add the entire contents of your old library in one shot, then merge up all the records, or try to set Calibre to do this automatically for you (see below). There are lots of different ways to do this that may make it easier. It may be best to move your library first using Calibre's new move library function. That will move what Calibre thinks are the correct folders and separate them from all the old folders (that Calibre seems to have forgotten about). Then, if you set set the regex in Add/Save correctly, and turn on the "If similar author title found ..." option, Calibre will be able to automatically match each new book to the correct old record (with good metadata) and you'll avoid having to do all the manual merges. Adding the old books should be trivial if you get them separated. It will take some testing to get it right, so if I was in your shoes, I'd back it all up and try several approaches to fix it, until I found one that would work well. Good luck! |
||||
07-25-2010, 09:21 AM | #9 | |||||
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
Quote:
And calibre certainly does create folders. When you import a new book it creates a folder for that author if not already in the database and a folder for the book. Quote:
Quote:
Quote:
Quote:
-Marcy |
|||||
07-25-2010, 09:32 AM | #10 |
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
Starson 17, thanks for pointing out the merge function. It's making the readding my 1700+ books easier. I didn't know about that.
I add the new book and merge it with the incorrect one that has the correct metadata. It's still 1700 hand-added entries, but still an improvement. -Marcy |
07-25-2010, 10:06 AM | #11 | |||||||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
If it helps any, I wrote the merge record code. I also wrote the code that handles "If books with similar authors and titles found, merge automatically" so I'm intimately familiar with the database structure of Calibre. I walked you through the simple solution of getting two records into Calibre that you could use my merge code on - one with metadata, and one with pointers to the actual book formats. I started there so you could see one option, however, that manual method is slow. The automatic merge will do the job much faster. It is possible to "fix the map" as you say, but it's harder than the automatic method described. |
|||||||
07-25-2010, 10:12 AM | #12 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
BTW, when you get done, you should run the Check database integrity and or move the database. Otherwise, you will have lots of junk folders mixed into Calibre's library folder. I assume you will backup before doing that. |
|
07-25-2010, 10:29 AM | #13 |
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
Even if I add the copy that calibre has forgotten about I have to hand edit some entries. Tags that came with books that I delete pop back up. I don't know why. I don't want to automatic merge because I can miss books that way. It's tedious but I want to make sure every book is replaced.
One issue I have with the merge is that it won't delete tags from later selected books. I assume it was designed that way, but that's a big part of what I'm trying to accomplish. A way to change the M shortcut to keep all the books would be helpful. That seems like it would be the most common use—to merge books in different formats without losing any of the books. -Marcy |
07-25-2010, 10:45 AM | #14 | |||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
formats:false Quote:
Quote:
That's the most common use, by far. In fact, I almost didn't include the "merge-keep others" option, as that wasn't even in my mind when I started to write the code. The "merge-keep others" option is used far less often. It's mostly used to make copies of other records for testing, or where you want to keep two different versions of the book in the same format (I have a collection of two column pdf classics and another collection of single column pdf classics that I keep.) |
|||
07-25-2010, 11:24 AM | #15 | |
Guru
Posts: 897
Karma: 950683
Join Date: Oct 2009
Device: Kobo Libra2
|
Quote:
The problem is that the whole calibre folder is wonky with some books missing. I have a backup folder with those books but it is missing other books, so have to switch between the two. Plus I need to make sure the right record is the dominant one in the merge process. One of the most important items I need to keep is the date. I use it to keep track of my reading. The re-added files often add with today's date and I don't want to lose the old date. -Marcy |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Corrupted File? | StealthyScribe | Kobo Reader | 8 | 07-21-2010 10:09 PM |
corrupted dbase | hnoto | Related Tools | 43 | 05-17-2010 11:27 AM |
Corrupted DB on Reader | djwoodard | Kobo Reader | 7 | 05-10-2010 01:13 AM |
Library corrupted | rozie123 | Sony Reader | 1 | 05-26-2009 07:02 AM |
metadata.db corrupted | Philantrop | Calibre | 9 | 01-05-2009 09:34 PM |