09-19-2010, 04:34 AM | #1 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
corrupt database, (powercut), possible solution
I've just had a power-cut and on restarting, discovered that calibre's database was corrupt. Luckily I made a backup just a few days ago.
However, I have a couple of questions regarding rebuilding the database if I hadn't had the backup, from the files inside the library folder. What filetypes aren't capable of storing all the metadata in them? Would storing an *.opf file in the directory with each entry be able to store all the metadata needed to rebuild the database. If it would, Could calibre do this automatically as a 'backup-redundancy' measure. |
09-19-2010, 11:27 AM | #2 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Try this
calibre-debug --reinitialize-db=/path/to/metadata.db |
Advert | |
|
09-19-2010, 01:07 PM | #3 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Kovid, It wasn't a problem as I'd backed up just a few days before and didn't actually lose any info, I was just curious about rebuilding the database from scratch, and whether storing an opf in with the entries would help, as you could store all the metadata which wouldn't be included in some formats, just in case.
For instance, have a COPY of the library, remove the metadata.db, and try to rebuild the library, would storing the opf's be a good step as reguard as to rebuilding said database. |
09-19-2010, 01:22 PM | #4 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes, you can use save to disk to "unwind" your database and then add books to recreate it.
|
09-19-2010, 01:32 PM | #5 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Could calibre then automatically store a copy of an opf in with the entries, just so if anything like this happens again, and a user hadn't got a backup (of any sort), then rebuilding would be fairly simple.
You could even have an option (perhaps in preferences, with 'Check database integrity') to 'Rebuild database from directory', which could read these opf's and rebuild the database as much as possible. |
Advert | |
|
09-19-2010, 01:38 PM | #6 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's certainly possible, but not something that's high on my priority list.
|
09-19-2010, 01:43 PM | #7 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
I wouldn't think it would be, other things are way more worthy.
And calibre is fairly bulletproof in this regard anyway, just having the powercut made me realize what I would miss if I hadn't had a recent backup. |
09-19-2010, 11:01 PM | #8 |
Wizard
Posts: 1,759
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
I had the same questions and problems. But now that I am using dropbox this is no longer a problem as if I ever have a metadata corruption and I can't recover the previous versions are available to me in dropbox so very easy to recover and I don't need to remember to backup every time after heavy us as it is done automatically.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Corrupt-a-Wish | Cookie Monster | Lounge | 1146 | 07-06-2013 04:25 PM |
0.7.15 - Installer corrupt | online.person | Calibre | 6 | 08-21-2010 10:06 AM |
Sony PRS 505 Database Corrupt | the_callant | Calibre | 3 | 04-08-2009 09:41 PM |
Corrupt display on the V3 | Trono | HanLin eBook | 7 | 12-18-2008 12:30 PM |
Unutterably Silly Corrupt-a-Saying | radioflyertoo | Lounge | 10 | 10-28-2008 03:20 PM |