Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-01-2026, 03:50 AM   #1
marknoumea
Junior Member
marknoumea began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2020
Device: Kobo Glo
Corrupted calibre library cannot be restored after update

Updated to 9.0 then 9.1 and Calibre then indicated that one of my Libraries was inaccessible as corrupted (no problem with the others).

calibre, version 9.1.0
Base de données corrompue: La base de données de votre bibliothèque E:\Documents\Bibliothèque calibre non fiction semble être corrompue. Voulez vous que calibre tente de la reconstruire automatiquement*? Cette reconstruction peut partiellement échouer.

Traceback (most recent call last):
File "calibre\gui2\ui.py", line 962, in library_moved
File "calibre\db\legacy.py", line 191, in __init__
File "calibre\db\legacy.py", line 45, in create_backend
File "calibre\db\backend.py", line 522, in __init__
File "calibre\db\schema_upgrades.py", line 30, in __init__
File "calibre\db\schema_upgrades.py", line 868, in upgrade_version_26
File "calibre\db\backend.py", line 1189, in execute
File "C:\t\t\apsw-lcy2rew4\src\cursor.c", line 202, in resetcursor
apsw.ConstraintError: FOREIGN KEY constraint failed

Tried automatically restoring but failed:

calibre, version 9.1.0
ERREUR : La réparation de la bibliothèque a échoué: La restauration de la base de données a échoué, cliquer sur "Afficher les détails" pour en apprendre davantage

Traceback (most recent call last):
File "calibre\db\restore.py", line 326, in replace_db
PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'E:\\Documents\\Bibliothèque calibre non fiction\\metadata.db' -> 'E:\\Documents\\Bibliothèque calibre non fiction\\metadata_pre_restore.db'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\db\restore.py", line 156, in run
File "calibre\db\restore.py", line 331, in replace_db
PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'E:\\Documents\\Bibliothèque calibre non fiction\\metadata.db'

Any help greatfully received -and I note that the last bug fix in 9.1 was supposed to fix a library restore problem, unsure if related

Thanks
Marknoumea
marknoumea is offline   Reply With Quote
Old 02-01-2026, 03:53 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,991
Karma: 29579720
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thats a permission error replacing metadata.db after the restore was successfully completed. Probably some other program on your system is holding the file open. You can try running the restore from the command prompt instead.

calibredb restore_database --library-path "c:\whatever" --really-do-it
kovidgoyal is offline   Reply With Quote
Advert
Old 02-01-2026, 11:09 PM   #3
marknoumea
Junior Member
marknoumea began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2020
Device: Kobo Glo
Will try - but an interesting issue is that when I open this library with portable version 8.16.2 I have no problems opening the library
marknoumea is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupted calibre library metadata - Need help Dailyread Library Management 8 10-13-2025 12:40 PM
Corrupted Calibre library theoldman Calibre 6 02-12-2025 12:25 AM
calibre library gets corrupted often iamashwin99 Library Management 4 04-05-2019 12:05 PM
Calibre Library appears to be corrupted adrenaline Calibre 8 06-20-2015 08:32 PM
Calibre library corrupted - slightly freaked out! chilady1 Calibre 6 12-08-2010 09:56 PM


All times are GMT -4. The time now is 07:16 AM.


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