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 12-15-2016, 11:27 AM   #1
Danesh
Enthusiast
Danesh began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2015
Device: none
Question refresh/update clibre database

Hi,
Having used The Remove books action I deleted an item from the Book list (calibre 2.70 [64bit]; I changed my mind and restored it from the Recycle Bin (Windows7 x64). Now that I search for the book in my calibre, it doesn't show up!
Should I refresh/update clibre database? If yes, how?
Regards,
Danesh is offline   Reply With Quote
Old 12-15-2016, 01:03 PM   #2
fidvo
Addict
fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.
 
Posts: 309
Karma: 1645952
Join Date: Jun 2012
Device: none
Restoring from the recycle bin only puts the file back in its original folder. It does not add the entry back to the database. As far as Calibre is concerned, it's now just an extra file in the data folder that shouldn't be there.

There's a rebuild library feature that might work (I've never used it myself) but I would recommend moving the folder containing the book file out of the Calibre library folder and re-adding it as a new book through the Calibre interface. That's probably your fastest way to get it back, since you wouldn't have to run a process that affects your entire library.
fidvo is offline   Reply With Quote
Advert
Old 12-15-2016, 03:34 PM   #3
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: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by fidvo View Post
Restoring from the recycle bin only puts the file back in its original folder. It does not add the entry back to the database. As far as Calibre is concerned, it's now just an extra file in the data folder that shouldn't be there.
On Windows at least, when a book is removed from a library, the book folder is moved to a temporary folder within the library's parent directory, and it is that folder than gets moved to the Recycle Bin.

So when you do a Restore from the Recycle Bin it is the temporary folder than gets restored. You can then use its content to add the book back into the library, then you will probably want to delete the restored temporary folder.

Click image for larger version

Name:	attachment.jpg
Views:	465
Size:	175.1 KB
ID:	153595

I'm not 100% sure, but I think the same basic process happens on OSX and Linux.

Note that I have not unchecked the Show this dialogue again checkbox in the 'Are you sure' message, in part because restoration of a deleted book is not just a matter of opening the Recycle Bin and doing a restore - instead it requires a Recycle Bin restore, a calibre add book, and a File Manager folder delete.

I normally find it easier to recover a wrongfully deleted book from back-up.

BR

Last edited by BetterRed; 12-16-2016 at 05:23 AM. Reason: added and arrow and comment to screen shot
BetterRed is offline   Reply With Quote
Old 12-16-2016, 03:42 AM   #4
Danesh
Enthusiast
Danesh began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2015
Device: none
Dear friends,

What's the path to the temporary folder within the library's parent directory, and also the data folder that fidvo said? To my shame, I failed to find them!
Best

Last edited by Danesh; 12-16-2016 at 03:49 AM.
Danesh is offline   Reply With Quote
Old 12-16-2016, 04:49 AM   #5
higgs
Connoisseur
higgs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicinghiggs causes much rejoicing
 
higgs's Avatar
 
Posts: 77
Karma: 149999
Join Date: Aug 2008
Location: Ireland
Device: Kobo Glo, Kobo Touch, Kindle PW3
If you open Calibre, click on your Library icon, then 'Switch/create library', the top line will show the path to your current calibre library.
higgs is offline   Reply With Quote
Advert
Old 12-16-2016, 05:10 AM   #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: 21,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Danesh - on Windows (I can't speak for Linux or OSX), when you remove a book, the book directory is MOVED from the library to a temporary directory in the library parent, which will have a random 6 character string in its name (e.g. 'D:\Calibre Libraries\_Test deleted avybyo' in my previous screenshot), and that means it's no longer in the library.

And then the temporary directory is MOVED to the Recycle Bin, and that in turn means it's no longer in the library parent directory.

On advanced files systems (NTFS, EXT3, HFS+ etc) the MOVES are effected via creating and destroying hardlinks, so it happens in the blink of eye. But in any event, after the delete the temporary directory will ONLY exist in the Recycle Bin.

I can't recall why calibre deletes book directories in a two step process. But I am certain it was a conscious design choice by Kovid, which he has explained a couple of times. A search of this subforum for posts by kovidgoyal that have 'delete' in them might find them.

I added some extra commentary to my previous screen shot.

BR

Last edited by BetterRed; 12-16-2016 at 05:22 AM.
BetterRed is offline   Reply With Quote
Old 12-16-2016, 11:11 AM   #7
fidvo
Addict
fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.
 
Posts: 309
Karma: 1645952
Join Date: Jun 2012
Device: none
Quote:
Originally Posted by BetterRed View Post
On Windows at least, when a book is removed from a library, the book folder is moved to a temporary folder within the library's parent directory, and it is that folder than gets moved to the Recycle Bin.
I didn't know that. This makes a lot of sense. Once again I'm impressed with the way Calibre always does things the right way.
fidvo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[calibre-server] database refresh delay aurigod Related Tools 1 08-18-2016 11:06 PM
Aura HD Database update freezes Mellobob Kobo Reader 4 10-16-2015 08:52 AM
What screen update settings (page refresh) do you use? PF4Mobile Onyx Boox 12 05-19-2013 04:03 AM
Database update errors nynaevelan Calibre 5 06-09-2011 12:23 PM
Firmware Update Bad Image Refresh and Settings after 2.3 update Insomnic Amazon Kindle 6 04-01-2010 11:59 AM


All times are GMT -4. The time now is 05:49 PM.


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