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 08-29-2016, 07:24 PM   #1
Ktz
Junior Member
Ktz began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2016
Device: Kindle
Corrupted database

So Calibre suddenly stopped loading my library, throwing error "UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 763: invalid continuation byte".
OK, I poked around, figured out the db is SQLite, and went and deleted the last added book from database, thinking that might be the issue (book name contains non-english characters. I have a bunch of other books with similar names and they worked, but doesn't hurt to try). So now, if I try to open the library, it tells me that database is corrupted, would you like to try to restore it? Sure thing, it starts restoring, and then fails with "The process cannot access the file because it is being used by another process: u'F:\\CalibreBooks\\metadata.db'". I've checked the file with ProcessExplorer, and the only process touching this file is Calibre itself. It lists that same process twice, so looks like calibre tries to open it twice and fails?

Anyways, is there a way to restore the database?
I'm on Windows 10, Calibre version 2.65.1.

Cheers!
Ktz is offline   Reply With Quote
Old 08-29-2016, 11:31 PM   #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,223
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Run

calibredb restore_database -r

in cmd.exe
kovidgoyal is offline   Reply With Quote
Advert
Old 08-30-2016, 09:15 AM   #3
Ktz
Junior Member
Ktz began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2016
Device: Kindle
Thanks, it worked! (mostly)
Ktz is offline   Reply With Quote
Old 08-30-2016, 09:22 AM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
This is why we make backups (we do make backups, don't we?).
HarryT is offline   Reply With Quote
Reply

Tags
database corrupted, database restore


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
And..... Again my database is corrupted Mondriaan Devices 15 01-16-2016 12:05 AM
Corrupted database Qylie Calibre 8 08-28-2014 02:02 AM
Database Corrupted karimnaguib Calibre 2 05-12-2014 09:19 AM
Corrupted Database chilady1 Library Management 20 11-12-2013 08:13 PM
Corrupted database garyft Calibre 3 05-13-2011 02:10 PM


All times are GMT -4. The time now is 11:00 PM.


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