![]() |
#1 |
Member
![]() Posts: 20
Karma: 10
Join Date: Oct 2014
Location: Schweiz [Switzerland]
Device: Pocketbook Verse Pro
|
Calibre database corrupted
For years, our extremely large Calibre database (8.7.0), which contains many additional data fields, has been running on an external LaCie hard drive.
Now, our MacBook (14.7.6 Sonoma) crashed while I was working due to a power outage. Since then, Calibre hasn't been able to open. Even multiple recovery attempts, as well as restarting the computer and opening Calibre in Safe Mode, did not resolve the problem. The following is the error message: calibre, version 8.7.0 Corrupted database: The library database (/Volumes/eBooks_LaCie/Calibre_2023_08_12) appears to be corrupted. Do you want Calibre to attempt to restore it automatically? The restore may not be successful. If you select No, Calibre will create a new, empty library. Traceback (most recent call last): File "calibre/gui2/main.py", line 323, in initialize_db File "calibre/db/legacy.py", line 197, in __init__ File "calibre/db/cache.py", line 190, in __init__ File "calibre/db/cache.py", line 474, in initialize_fts File "calibre/db/cache.py", line 485, in start_fts_pool File "calibre/db/cache.py", line 85, in call_func_with_lock File "calibre/db/cache.py", line 597, in queue_next_fts_job File "calibre/db/cache.py", line 500, in _update_fts_indexing_numbers File "calibre/db/fts/connect.py", line 70, in number_dirtied File "calibre/db/fts/connect.py", line 59, in get_connection File "calibre/db/fts/connect.py", line 42, in initialize File "calibre/db/backend.py", line 433, in execute File "src/cursor.c", line 240, in resetcursor apsw.CorruptError: CorruptError: database disk image is malformed Is there still hope for rescue? (Translated from German using Google Translate) |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,094
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Is this drive a direct connected drive (eg. USB).
Calibre does not support shared, Network or cloud drives. Delays lead to corruption. |
![]() |
![]() |
![]() |
#3 |
Member
![]() Posts: 20
Karma: 10
Join Date: Oct 2014
Location: Schweiz [Switzerland]
Device: Pocketbook Verse Pro
|
Yes, I think so. It is a thunderbolt device connected by an USB-adapter.
The disk still works properly. |
![]() |
![]() |
![]() |
#4 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,094
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 only reason I can figure is the computer or disk powered down abnormally. |
|
![]() |
![]() |
![]() |
#5 | ||||
Member
![]() Posts: 20
Karma: 10
Join Date: Oct 2014
Location: Schweiz [Switzerland]
Device: Pocketbook Verse Pro
|
Quote:
Quote:
Quote:
Quote:
With this, along with the necessary background knowledge and suitable tools, could one repair the database "by hand"? And for a better understanding: Does the data stored in the respective file (/Volumes/eBooks_LaCie/Calibre_2023_08_12/Author/Book/metadata.opf) contain all the data present in the respective book record? Or only the data stored in the book metadata? |
||||
![]() |
![]() |
![]() |
#6 | |||
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,522
Karma: 169115146
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
With no device connected, click on the Library icon => Library Maintenance => Restore database. Quote:
Quote:
You can also run the database recovery from a command line which may help in some cases where the GUI is having issues. In a terminal session, the command line below should work but again do a backup of the library before using it. You can also run calibredb alone to see more of it's options. Code:
/Applications/calibre.app/Contents/MacOS/calibredb restore_database |
|||
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,094
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The restore process uses metadata_db_prefs_backup.json
That has all the structure of metadata.db. So any custom column should be created as it was (includes 'from other columns'), the the restore of the entries happens. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre database missing or corrupted | zamorano | Calibre Companion | 20 | 05-22-2020 05:25 AM |
Corrupted Database with Calibre 2.75 | vincentim2 | Calibre | 1 | 12-23-2016 07:47 PM |
Import an old Calibre library with corrupted database | Beanxx | Library Management | 3 | 05-08-2015 04:12 PM |
[Old Thread] Calibre database keeps getting corrupted on Win 7 - help!?! | jer989 | Calibre | 17 | 01-01-2013 03:36 PM |
Calibre Mac & Windows (Corrupted Database) | ciscoswitch | Calibre | 4 | 09-08-2010 01:29 PM |