View Single Post
Old 10-03-2021, 10:33 PM   #2301
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by ownedbycats View Post
How would I restore a database backup taken with Kobo Utilities? Just copy the files over?

Also, should I restore, considering it was the Kobo resetting itself after a "malformed database" error?

More information: https://www.mobileread.com/forums/sh...d.php?t=342091

EDIT: Well, I tried restoring my database. I checked and noticed some of my books had out-of-date TOCs. So I tried to update them and

Code:
calibre, version 5.28.0
ERROR: Unhandled exception: <b>ConstraintError</b>:ConstraintError: UNIQUE constraint failed: content.ContentID

calibre 5.28 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 2, 1) && Action Chains (1, 13, 2) && Audit Log (1, 0, 16) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (2, 1, 0) && Comments Cleaner (1, 4, 0) && Count Pages (1, 11, 1) && Embed Comic Metadata (1, 6, 1) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && Extract ISBN (1, 5, 0) && FanFicFare (4, 6, 0) && Fantastic Fiction (1, 4, 0) && Favourites Menu (1, 0, 5) && Find Duplicates (1, 8, 10) && Generate Cover (2, 0, 2) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Import List (1, 5, 6) && Job Spy (1, 0, 190) && Kindle hi-res covers (0, 5, 0) && Kobo Books (1, 8, 2) && Kobo Utilities (2, 14, 1) && KoboTouchExtended (3, 5, 3) && Last Modified (0, 7, 1) && Library Codes (1, 0, 50) && Manage Series (1, 2, 11) && Modify ePub (1, 6, 3) && Obok DeDRM (7, 2, 1) && Open With (1, 5, 13) && Overdrive Link (2, 47, 0) && Quality Check (1, 11, 4) && Reading List (1, 7, 7) && Search The Internet (1, 8, 1) && SmartEject (2, 3, 0) && Standard Ebooks (1, 0, 0) && Sum Column (0, 3, 1) && View Manager (1, 6, 1) && Walk Search History (1, 3, 2) && Overdrive Link* (2, 47, 0)
Traceback (most recent call last):
  File "calibre_plugins.koboutilities.action", line 5361, in update_book_toc_on_device
  File "calibre_plugins.koboutilities.action", line 5789, in update_device_toc_for_books
  File "calibre_plugins.koboutilities.action", line 5813, in update_device_toc_for_book
  File "calibre_plugins.koboutilities.action", line 5926, in addChapterToDatabase
apsw.ConstraintError: ConstraintError: UNIQUE constraint failed: content.ContentID
I'm going to take this as the database already being screwed up at the time the backup was taken. I'll just do the sign out-sign in process and re-send all my sideloads.
If you are using the automatic database backup, it runs a check on the database after copying it and before zipping it up. If the database is corrupt, it puts the word "CORRUPT" in the file name and does not zip it. Plus it should display an error.

That error isn't about database corruption as such. It says there was a duplicate key. There is probably an inconsistency between the books on the device and in the database. After restoring the backup, make sure you restart the device and then connect and disconnect the device before doing anything else. That will give the device a chance to do any cleanup necessary and import new books. The only problem with this is if you any books you resent to the device after the backup was take, will be imported as new which means you will lose their reading status.
davidfor is offline