Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-20-2008, 12:30 PM   #1
NigelS
Enthusiast
NigelS doesn't litterNigelS doesn't litter
 
Posts: 37
Karma: 188
Join Date: Dec 2007
Device: PRS-505
library.db doesn't migrate?

Just installed the new version 84 (fresh install) on a Vista PC. I pointed calibre at \Documents\My Books\Calibre for the storage folder, where I had placed a copy of library.db that I wanted to migrate across.

However, despite the dialog saying that library.db would be migrated across to the new database; nothing actually happened.

How do I now import/migrate the contents of library.db across from my old installation?

Thanks
NigelS
NigelS is offline   Reply With Quote
Old 09-20-2008, 12:36 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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The migration happens automatically you dont need to move library1.db. Just find and delete a folder called calibre in which there is a file global.py

Then delete and recreate the folder \Documents\My Books\Calibre

Leave library1.db in its old location and run calibre. It will ask you for a new folder location at which time you specify \Documents\My Books\Calibre
kovidgoyal is offline   Reply With Quote
Old 09-20-2008, 02:29 PM   #3
NigelS
Enthusiast
NigelS doesn't litterNigelS doesn't litter
 
Posts: 37
Karma: 188
Join Date: Dec 2007
Device: PRS-505
Ok Thanks, I'll play around some more.

I did try and upgrade the old version in situ (in a WinXP virtual machine) and that migrated OK.

It did however, create bookname subfolders in the form: bookname (x) - where X was an increasing integer. Is there any reason it does this (ie append the number in parentheses)? I find it rather annoying and wish it didn't - is there anyway to edit the filepath that is stored in the meta db?

Thanks
NigelS
NigelS is offline   Reply With Quote
Old 09-20-2008, 02:34 PM   #4
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is a reason (data integrity) and no you can't get rid of it.
kovidgoyal is offline   Reply With Quote
Old 09-24-2008, 08:56 AM   #5
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
Cannot migrate library

Just installed the new version .86 on XP and the conversion stop at 5%.
don1011 is offline   Reply With Quote
Old 09-24-2008, 12:46 PM   #6
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm is there a particular book it stops at?
kovidgoyal is offline   Reply With Quote
Old 09-24-2008, 04:34 PM   #7
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
Probably
don1011 is offline   Reply With Quote
Old 09-24-2008, 04:38 PM   #8
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the conversion progress dialog should tell you what boko it's stopping at
kovidgoyal is offline   Reply With Quote
Old 09-24-2008, 04:40 PM   #9
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
How can i identify and delete that corrupted book if calibre does not open
don1011 is offline   Reply With Quote
Old 09-24-2008, 04:42 PM   #10
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'll tell you how if you canc onfirm it is indeed a single book.
kovidgoyal is offline   Reply With Quote
Old 09-24-2008, 04:47 PM   #11
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
in the new folder books/calibre i have a folder with no book inside. I suppose that it is the corrupted book.
don1011 is offline   Reply With Quote
Old 09-24-2008, 05:09 PM   #12
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
I have deleted the folder with no book inside but still the same problem. I have also deleted the metadata db in the folder before my test
don1011 is offline   Reply With Quote
Old 09-24-2008, 05:24 PM   #13
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Delete the books folder (i.e. the folder that used to contain/contains metadata.db) THe delete the folder named calibre that contains global.py (you might have to do a search on your computer for global.py). Then run calibre. It should start trying to migrate the database again. Wath the progress dialog and note what book it stops at. Once you have the book name, I will tell you how to remove that book from the old database and redo the migration
kovidgoyal is offline   Reply With Quote
Old 09-25-2008, 08:05 AM   #14
don1011
Enthusiast
don1011 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Oct 2007
Location: Montreal, Canada
Device: Kindle
Let"s suppose that i have the name of the book contaminated. How do i remove it from the old database?
don1011 is offline   Reply With Quote
Old 09-25-2008, 12:12 PM   #15
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Code:
calibre-debug -c "from calibre.library.database import LibraryDatabase; db = LibraryDatabase('library1.db'); db.refresh('title', True); import pprint; pprint.pprint(db.data)"
replace library1.db witht he full path to library1.db

This will print out all the books in the database with their id numbers. Once you have the id number for the problem book:

Code:
calibre-debug -c "from calibre.library.database import LibraryDatabase; db = LibraryDatabase('library1.db'); db.refresh('title', True); db.delete_book(id)"
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrate Library to Windows 7 64bit tulsa Calibre 4 05-10-2010 02:01 PM
calibre 0.6.12 does not migrate DB nor launch earthq Calibre 4 09-16-2009 06:59 PM
Possible to migrate sony reader library? cpj Sony Reader 4 01-02-2009 07:40 PM


All times are GMT -4. The time now is 01:17 PM.


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