View Single Post
Old 06-19-2015, 07:30 PM   #7
adrenaline
Enthusiast
adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.adrenaline solves Fermat’s last theorem while doing the crossword.
 
Posts: 43
Karma: 28554
Join Date: Mar 2013
Device: Kindle Keyboard, KPW2
Quote:
Originally Posted by eschwartz View Post
That implies some other program has the file open and is locking it. Perhaps your antivirus is scanning it or something?

You might try running the restore via the command-line -- type the following into the command prompt:
Code:
calibredb restore_database -r
Thanks again, eschwartz

Disabled Kaspersky Internet Security and MalwareBytes and tried restoring using command prompt.

Code:
Restoring database succeeded
old database saved as C:\Users\John\Documents\Calibre Library\metadata_pre_restore.db
Some errors occurred. A detailed report was saved to calibre_db_restore_report.txt
Under calibre_db_restore_report.txt,

I see about 10 books with similar error message as this one:

Code:
C:\Users\John\Documents\Calibre Library\American Academy Of Pediatrics\The American Academy of Pediatrics Guide (91) with error:
		Traceback (most recent call last):
		  File "site-packages\calibre\db\restore.py", line 253, in restore_books
		  File "site-packages\calibre\db\cache.py", line 57, in call_func_with_lock
		  File "site-packages\calibre\db\cache.py", line 1983, in restore_book
		  File "site-packages\calibre\db\backend.py", line 1707, in restore_book
		  File "site-packages\calibre\db\backend.py", line 816, in executemany
		  File "c:\cygwin64\home\kovid\sw\build\apsw-3.8.2-r1\src\cursor.c", line 231, in resetcursor
		ConstraintError: ConstraintError: UNIQUE constraint failed: data.book, data.format
I don't need some of those books so deleted them from Calibre and can get the rest from my backups of the Calibre folder. So that's no problem.

But wondering whether the other books in the library are okay and how I can prevent this from happening in the future (apart from the system crashing on its own).

I make backups of the Calibre folder once in two weeks.

Last edited by adrenaline; 06-19-2015 at 07:47 PM.
adrenaline is offline   Reply With Quote