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 06-02-2013, 03:32 AM   #1
jgt1942
Connoisseur
jgt1942 began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
Can you undo a delete

I'm not sure what the heck I pressed after selecting 200 book but I saw a window and I though it was asking me to confirm the delete. I click NO but the 200 books were deleted and I could not stop the delete process. I cannot find the UNDO function.
jgt1942 is offline   Reply With Quote
Old 06-02-2013, 04:39 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by jgt1942 View Post
I'm not sure what the heck I pressed after selecting 200 book but I saw a window and I though it was asking me to confirm the delete. I click NO but the 200 books were deleted and I could not stop the delete process. I cannot find the UNDO function.
There is no UNDO function in Calibre. It might be worth checking your Recycle/Trash bin to see if the books are there.
itimpi is offline   Reply With Quote
Advert
Old 06-02-2013, 05:19 AM   #3
jgt1942
Connoisseur
jgt1942 began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
OK I see them in the recycle bin, how do I get them back in Calibre? Is it just a drag-n-drop?
jgt1942 is offline   Reply With Quote
Old 06-02-2013, 05:37 AM   #4
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by jgt1942 View Post
OK I see them in the recycle bin, how do I get them back in Calibre? Is it just a drag-n-drop?
That is the way that I add them back if I make a mistake.
itimpi is offline   Reply With Quote
Old 06-02-2013, 05:58 AM   #5
jgt1942
Connoisseur
jgt1942 began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
OK I'm having a problem. I see a bunch of "folders" that have a name like "Dragons of Winter Night_ Chronicles, Vol (6837)". I select all of them and did a drag-n-drop on Calibre but as I moused over Calibre I see a circle with a diag-line through it. I went back to the recylce bin, selected the folders, right-clicked and selected Restore. In a flash the files were restored but I'm not sure if they are in Calibre. I forgot to look at the number of books in Calibre before I did the restore. I closed the recycle bin and opened it again, the folders I had selected are gone. I looked in Calibre and I think I see the books. I've been attempting to clean up my Calibre library and is is mostly rote effort and the mind kinda goes to sleep.

I had changed the Calibre date of the books I was working with just before I accidentally deleted them so I just went back into Calibre and selected all of the books with the date I changed them to and performed a polish - only 106 books are being polished. I think I missed about 100 of the books in the restore effort.
jgt1942 is offline   Reply With Quote
Advert
Old 06-02-2013, 06:05 AM   #6
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Restoring the deleted files will not make them re-appear in calibre as it will not undo the changes made to the Calibre metadata.db file. What will probably do the job is to use the Library Maintenance function.
itimpi is offline   Reply With Quote
Old 06-02-2013, 06:13 AM   #7
jgt1942
Connoisseur
jgt1942 began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
How do you do "Library Maintenance function"> I made a quick look in the help file but did not find anything helpful.
jgt1942 is offline   Reply With Quote
Old 06-02-2013, 06:20 AM   #8
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Click on the Library icon - it is one of the options available from there.
itimpi is offline   Reply With Quote
Old 06-02-2013, 06:35 PM   #9
jgt1942
Connoisseur
jgt1942 began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
Sorry to be obtuse. It took me a bit to determine which icon was the library icon. On my view it is not labeled Library, for the label it has the number of books. When I select Library Maintenance I see four options where in the heck are these documented? I selected "Check Library", which took a while to run. There is a very limited amount of help available (not enough for me) for the results of this function and at this point I'm lost. BTW I don't see any difference in the number of books after running this function and what I had before running it.
jgt1942 is offline   Reply With Quote
Old 06-02-2013, 07:43 PM   #10
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@jgt1942 - When I've inadvertently deleted some books I've found that the way to recover them is to either go to my backup, or proceed as follows
  1. Restore the deleted book folders back to where they were, using normal OS (Windows, OS/X, Linux) facilities
  2. In Calibre right click the "Library" icon and select Library maintenance->Restore database
This should add the restored books back into the calibre database, and the book count should go up accordingly - and your books should be accessible in Calibre.

Brief explanation

The 'heart, body and soul' of Calibre is a relational database, there's one for every library - its named «metadata.db».

Calibre does not store the actual books its database (i.e. the epubs, pdfs etc) only the data about the books - i.e. the metadata. The actual books (format files) are stored in the author/book folders

And, in each book folder there is always a file called «metadata.opf». This is a copy of what's in the database for the book. The sole purpose (I think) of these files is to enable the database to be rebuilt.

And that's what the Restore Database does - rebuilds the main database «metadata.db» from the «metadata.opf» files inside each book folder

Hope this helps

Cheers BR
BetterRed is online now   Reply With Quote
Old 06-03-2013, 01:41 AM   #11
jgt1942
Connoisseur
jgt1942 began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
After more checking the book folders I restored from the recycle bin are not showing up in Clalibre. Either I did not perform the library maintenance correctly or I need to do something else that is not obvious to me.
jgt1942 is offline   Reply With Quote
Old 06-03-2013, 02:03 AM   #12
jgt1942
Connoisseur
jgt1942 began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
@BetterRed your post is super helpful and I have a few questions.
1) Is it correct to assume that you run a backup of the metadata.db (mine is 27 MB) file (or is the backup your entire library folder, mine is about 10 GB). Normally I'm a super big fan of backups, I just checked and I'm not backing up my Calibre library but this will be fixed tonight.
2) Is it correct to assume, without restoring the author folders running the Calibre Library maintenance->Restore database will not do anything for me at this time.
jgt1942 is offline   Reply With Quote
Old 06-03-2013, 02:11 AM   #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,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This is all way more complex than it needs to be. Just drag the folders from your recycle bin to some other folder say c:\restored_books in your computer. Then in calibre right click the add books button and select add books from directories, one book per directory and point it to the c:\restored_books folder.

All your books will be re-added, with correct metadata, with the only caveat that the date column will show the current date rather than the original date. If you want to restore the date column then you have to use the restore database method previously described.
kovidgoyal is offline   Reply With Quote
Old 06-03-2013, 02:13 AM   #14
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by jgt1942 View Post
After more checking the book folders I restored from the recycle bin are not showing up in Clalibre.
Do the book folders exist in the calibre directory structure? If not go and see if they are once again in the recycle bin, if so restore them.

Quote:
Originally Posted by jgt1942 View Post
1) Is it correct to assume that you run a backup of the metadata.db (mine is 27 MB) file (or is the backup your entire library folder, mine is about 10 GB).
Run a backup of the entire library folder, the metadata.db file is in its root and will be part of the backup.

Quote:
Originally Posted by jgt1942 View Post
2) Is it correct to assume, without restoring the author folders running the Calibre Library maintenance->Restore database will not do anything for me at this time.
This is correct you must have the missing folders and files restored to the calibre library folder structure for the restore database to work in the way you want it to.

Update: Easiest to follow Kovid's advice above.

Last edited by DoctorOhh; 06-03-2013 at 02:16 AM.
DoctorOhh is offline   Reply With Quote
Old 06-03-2013, 03:37 AM   #15
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by jgt1942 View Post
1) Is it correct to assume that you run a backup of the metadata.db (mine is 27 MB) file (or is the backup your entire library folder, mine is about 10 GB). Normally I'm a super big fan of backups, I just checked and I'm not backing up my Calibre library but this will be fixed tonight.
Backup the entire library folder - all the folders and all the files.

I also include Calibre's configuration folder in the same backup set - its location can be determined from Calibre->Preferences->Miscellaneous->Open Configuration Folder.

Quote:
Originally Posted by jgt1942 View Post
2) Is it correct to assume, without restoring the author folders running the Calibre Library maintenance->Restore database will not do anything for me at this time.
Windows will recreate any author folders it needs to create when you restore book folders from the Recycle Bin - I'm 99.5% sure OS/X and Linux will do the same.

Or do as Kovid suggests, move them out of the rubbish bin and add them again. If you're using Windows, the Recycle Bin Edit menu has a Move to folder option... and in there there's a create folder option. In Windows if you move them this way or via drag drop then the Author folders will NOT be created.

BR
BetterRed is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content KT UNDO RESET pablo1978 Amazon Kindle 2 07-15-2012 06:49 PM
PRS-T1 undo changes rubentje1991 Sony Reader Dev Corner 9 01-22-2012 12:23 PM
Undo Jailbreak Klew721 Kindle Developer's Corner 3 01-19-2012 06:17 PM
Sigil undo crutledge Sigil 15 08-16-2011 11:11 AM
Delete files in PC not equal to delete in Sony reader 505 sheilalayoli Sony Reader 5 07-12-2009 03:13 PM


All times are GMT -4. The time now is 02:41 AM.


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