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 09-01-2014, 02:36 PM   #1
madelonw
Enthusiast
madelonw began at the beginning.
 
Posts: 41
Karma: 10
Join Date: May 2009
Location: FL
Device: Kindle 2, Kindle with Special Offers, iPad 2
Exclamation Database Rebuild... lost books

I got the error asking if I wanted to rebuild my Calibre database... I said Yes.

I had 13,000+ books cataloged. Now I have 810. I am using version 2.0 (I know there is an update, just haven't gotten around to installing it.) I am running 64-bit Calibra on a Windows 8.1 laptop. My Calibre folder lives on an external hard drive. I would add that I have added several custom columns to Calibre, all of which are still there.

I still seem to have all the folders in my Calibre folder, and I see the following files:

.driveinfo.calibre
.metadata.calibre
metadata.db
metadata_db_prefs_backup.json (which appears to be editable with a text editor)
metadata_pre_restore.db

Short of starting all over with a totally new database and adding all the books from my Calibre folder back in, is there a way to get back to where I was.

madelonw is offline   Reply With Quote
Old 09-01-2014, 02:41 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
calibre should not delete anything. Are the folders still there? Try using Check Library to locate the non-indexed book folders. You can then move them and add them manually.

One possible problem is that calibre will only rebuild one book per id. Was there an error message when you rebuilt the database? If so, the log might prove enlightening.

Last edited by eschwartz; 09-01-2014 at 02:44 PM.
eschwartz is offline   Reply With Quote
Advert
Old 09-01-2014, 03:04 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,076
Karma: 57259778
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by madelonw View Post
I got the error asking if I wanted to rebuild my Calibre database... I said Yes.

I had 13,000+ books cataloged. Now I have 810. I am using version 2.0 (I know there is an update, just haven't gotten around to installing it.) I am running 64-bit Calibra on a Windows 8.1 laptop. My Calibre folder lives on an external hard drive. I would add that I have added several custom columns to Calibre, all of which are still there.

I still seem to have all the folders in my Calibre folder, and I see the following files:

.driveinfo.calibre
.metadata.calibre

metadata.db
metadata_db_prefs_backup.json (which appears to be editable with a text editor)

metadata_pre_restore.db

Short of starting all over with a totally new database and adding all the books from my Calibre folder back in, is there a way to get back to where I was.


The RED should not be there, those are device only files. Someone has been messing beneath the skirts and probably done additional harm.

The green is normal (and is the heart of the Library GUI)
Author folders with titles (index_number) inside those

The last is probably from a restore attempt (not usually leftover)
theducks is offline   Reply With Quote
Old 09-01-2014, 06:43 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,761
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
The RED should not be there, those are device only files. Someone has been messing beneath the skirts and probably done additional harm.

The green is normal (and is the heart of the Library GUI)
Author folders with titles (index_number) inside those

The last is probably from a restore attempt (not usually leftover)
Maybe someone accidentally connected to the Library folder in the Connect/Share->connect to folder. I've no idea what would happen if one did that - I shall go away and do it, after I do a backup

BR
BetterRed is offline   Reply With Quote
Old 09-01-2014, 07:42 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
On its own it does nothing but index the books there. The danger is connecting to the folder and maybe deleting stuff. Or sending stuff and overwriting files or clogging the library with junk.
eschwartz is offline   Reply With Quote
Advert
Old 09-01-2014, 07:43 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,761
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by BetterRed View Post
Maybe someone accidentally connected to the Library folder in the Connect/Share->connect to folder. I've no idea what would happen if one did that - I shall go away and do it, after I do a backup BR
Well if you do that then you'll end up with a .driveinfo.calibre and a .metadata.calibre library in your library folder. See first attachment.

Then if you send some books to that folder you'll end up with a bit of shambles see second attachment. The backup is on the left, the operational library is on the right

So I'm postulating that the OP made a genuine usage mistake rather than breaking the 'golden rule'.

@madelonw - does the above make any sense, might you have inadvertently selected your library folder in a Connect/Share->connect to library. I used a Test library, the 9 books I sent to the Connected folder disappeared from the Library, as can be seen in the second attachment there are less author folders on the right than there are on the left.

IMO you need to build a new library by importing books from the 'broken' one - but I'm unsure of the best way to do that such that your metadata is retained. If the library copies have current metadata embedded - eg via Polish, Modify or Embed then its easy to set up the Add options to extract metadata from the books, if not then ideally you would want to get the metadata from the opf files, I don't know how to do that.

Oh, to retain your custom columns in the new library, you should be able to created the new library based on the existing one.

Aside : maybe there should be a warning - "Do you really want to connect to this library folder" ie a folder with a metadata.db.

BR
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	225
Size:	44.9 KB
ID:	127643   Click image for larger version

Name:	Capture1.JPG
Views:	211
Size:	279.6 KB
ID:	127644  
BetterRed is offline   Reply With Quote
Old 09-01-2014, 07:50 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by BetterRed View Post
IMO you need to build a new library by importing books from the 'broken' one - but I'm unsure of the best way to do that such that your metadata is retained. If the library copies have current metadata embedded - eg via Polish, Modify or Embed then its easy to set up the Add options to extract metadata from the books, if not then ideally you would want to get the metadata from the opf files, I don't know how to do that.

Oh, to retain your custom columns in the new library, you should be able to created the new library based on the existing one.
It should be enough to use Library Maintenance. Check library will allow you to clean up any extraneous files (anything the database doesn't say is there).

Unless files were deleted or overwritten, in which case they don't exist to be imported into the new library.
eschwartz is offline   Reply With Quote
Old 09-01-2014, 07:58 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Instead of using Check library to list and optionally delete files not in the library, to move/reimport/discard them, one could create a new library (check the box to use the current library structure, if you wish to preserve layout/custom columns), and use the second option in the Add books dropdown, to import books from a directory, including subdirectories, assue each directory is a separate book where each file is is the same book in a different format.

It will import metadata from the opf, and the cover.jpeg -- I am informed (today) that apparently it will not import the cover unless there is an opf. But that shouldn't matter here.
eschwartz is offline   Reply With Quote
Old 09-01-2014, 08:04 PM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,761
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@e..w - answered my query

Last edited by BetterRed; 09-01-2014 at 08:08 PM.
BetterRed is offline   Reply With Quote
Old 09-01-2014, 08:08 PM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Excellent point. See my cross-post. (cross-posting = fun )

Just giving general theories here (and it's difficult on my Kindle Touch to keep track of more than one or two posts tiny screen).
eschwartz is offline   Reply With Quote
Old 09-01-2014, 08:13 PM   #11
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,761
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
Excellent point. See my cross-post. (cross-posting = fun )

Just giving general theories here (and it's difficult on my Kindle Touch to keep track of more than one or two posts tiny screen).
I have the same problem on a 24" 1920x1200 :lol:

BR
BetterRed is offline   Reply With Quote
Old 09-01-2014, 08:22 PM   #12
madelonw
Enthusiast
madelonw began at the beginning.
 
Posts: 41
Karma: 10
Join Date: May 2009
Location: FL
Device: Kindle 2, Kindle with Special Offers, iPad 2
Quote:
Originally Posted by theducks View Post
The RED should not be there, those are device only files. Someone has been messing beneath the skirts and probably done additional harm.

The green is normal (and is the heart of the Library GUI)
Author folders with titles (index_number) inside those

The last is probably from a restore attempt (not usually leftover)
Thanks so much for the info. I have my original database back again... I took out the red, took out the new metadata.db, renamed the pre_backup to metadata.db and all looks fine now.

madelonw is offline   Reply With Quote
Reply

Tags
database errors, database restore


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database rebuild Jellby Kobo Reader 17 08-31-2014 04:25 AM
How to Rebuild Database apswartz Calibre 12 03-28-2010 01:11 PM
How to rebuild database in metafile gandor62 Calibre 3 03-27-2010 08:31 PM
Force Database Rebuild? davidm_uk Calibre 2 01-13-2010 02:59 PM
Rebuild Database? & Use Path instead of Filename? gai-jin Calibre 0 07-20-2009 02:58 PM


All times are GMT -4. The time now is 05:29 AM.


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