Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2023, 12:39 PM   #1
elstupid
Junior Member
elstupid began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2023
Device: Kobo Clara 2E
Database corrupt, what can I do?

Hello. My Calibre was working fine until this afternoon. I select like 100 ebooks and pressed delete. After that I got an error about deleting files.
After trying to restart Calibre, it's now complaining about a corrupt database.

Code:
Traceback (most recent call last):
  File "calibre\db\backend.py", line 1442, in read_tables
  File "calibre\db\tables.py", line 113, in read
apsw.CorruptError: CorruptError: database disk image is malformed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\gui2\main.py", line 331, in initialize_db
  File "calibre\db\legacy.py", line 200, in __init__
  File "calibre\db\cache.py", line 434, in init
  File "calibre\db\backend.py", line 1439, in read_tables
apsw.CorruptError: CorruptError: database disk image is malformed
Repairing doesn't work. Calibre Web doesn't mind, it still works. Also I can open the database with SQLiteSpy. Any idea what could be the problem and what to do? Or even why this happened?

Thanks!
elstupid is offline   Reply With Quote
Old 05-14-2023, 12:54 PM   #2
elstupid
Junior Member
elstupid began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2023
Device: Kobo Clara 2E
I also tried to restore the database, based on an empty database, as stated in this thread:
https://www.mobileread.com/forums/sh...d.php?t=262064
This gave me some hope, but finishes with the next message:

Code:
Traceback (most recent call last):
  File "calibre\db\restore.py", line 151, in run
Exception: Something bad happened
elstupid is offline   Reply With Quote
Advert
Old 05-14-2023, 01:08 PM   #3
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,882
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Is this DB on Google drive (or other cloud or NAS)?
theducks is offline   Reply With Quote
Old 05-14-2023, 01:11 PM   #4
elstupid
Junior Member
elstupid began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2023
Device: Kobo Clara 2E
I have it on a NAS indeed
elstupid is offline   Reply With Quote
Old 05-14-2023, 03:05 PM   #5
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,882
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
https://manual.calibre-ebook.com/faq...rked-drive-nas

Backup to a NAS is OK, but do not 2 way sync and NEVER use Google drive
theducks is offline   Reply With Quote
Advert
Old 05-14-2023, 03:19 PM   #6
elstupid
Junior Member
elstupid began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2023
Device: Kobo Clara 2E
Had a backup of like a week old and managed to fix things myself with a bunch of database queries. I guess a NAS or network location isn't really reliable, so I will create a backup job for it
elstupid is offline   Reply With Quote
Old 05-14-2023, 03:21 PM   #7
elstupid
Junior Member
elstupid began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2023
Device: Kobo Clara 2E
Quote:
Originally Posted by theducks View Post
https://manual.calibre-ebook.com/faq...rked-drive-nas

Backup to a NAS is OK, but do not 2 way sync and NEVER use Google drive
Thanks for pointing me in the right direction!
elstupid is offline   Reply With Quote
Old 05-14-2023, 03:24 PM   #8
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,882
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Calibre is a hybrid of DB and files.

The DB tracks where it puts files. If anything tampers, delays... things get lost.
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre corrupt error corrupt error database disk image is malformed didu812 Calibre 50 04-10-2024 08:51 AM
Aura HD Corrupt database? patrik Kobo Reader 34 01-13-2014 02:10 AM
Database corrupt mwerth1 Calibre 4 08-07-2012 07:31 PM
Corrupt database tonyjbird Introduce Yourself 5 04-03-2012 06:26 AM
Corrupt database jjansen Calibre 4 10-26-2011 11:51 PM


All times are GMT -4. The time now is 10:47 AM.


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