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-18-2024, 02:10 PM   #1
Mister Underhill
Junior Member
Mister Underhill began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2024
Device: Kindle Paperwhite
Recovering library after a HD crash

Hi! I'm sure I'm not the first person to run into this problem, but I can't seem to find a thread anywhere to help me solve the issue.

Here's the situation:

My hard drive crashed--like, no longer working or accessible. So I am not able to export my library. I was running an older version of Calibre -- 5-something, I think? For one reason or another, I was not up to date.

But, thanks to File History (I'm on PC), I do have a backup of the Calibre Library folder on an external HD.

I've replaced my HD, done a fresh Win11 install, installed the latest Calibre v7.18, and copied the backup library folder back onto the new HD.

My problem is trying to get my library into the new Calibre install. I've tried using "Switch/Create Library" to point to the folder, but it returns an error message that says "There is no existing calibre library at [path]."

Any ideas or suggestions on how to restore my library would be GREATLY appreciated!
Mister Underhill is offline   Reply With Quote
Old 09-18-2024, 02:41 PM   #2
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,441
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
metadata.db is what makes it recognized as a 'Calibe Library' (folder)

The folder that contains this is the Library (and the name).
The name can be anything OS legal, but is best if you stay with basic ASCII characters.

I change the name from the default for my working Library (that is the one I back up)

The reason, if your Calibre configuration folder gets damaged, Calibre puts the defaults back and 'Calibre Library' will now show (without your books as that is not the Library you wanted)

Instant warning that something we WRONG and you should start your recovery plan.
Attached Thumbnails
Click image for larger version

Name:	BasicLibrary.JPG
Views:	40
Size:	14.0 KB
ID:	210878  
theducks is offline   Reply With Quote
Advert
Old 09-18-2024, 04:47 PM   #3
Mister Underhill
Junior Member
Mister Underhill began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2024
Device: Kindle Paperwhite
Ah, okay. In the folder there are a bunch of metadata.db files, but they all include a datestamp in the filename. For instance, the latest one is "metadata (2024_09_09 15_59_25 UTC).db".

So should I just rename that to metadata.db?

Also, I notice that there are a bunch of datestamped .json files named "metadata_db_prefs_backup (DATE).json". Are these configuration files?

Thanks so much for the response!
Mister Underhill is offline   Reply With Quote
Old 09-18-2024, 07:11 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,989
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Mister Underhill View Post
Ah, okay. In the folder there are a bunch of metadata.db files, but they all include a datestamp in the filename. For instance, the latest one is "metadata (2024_09_09 15_59_25 UTC).db".

So should I just rename that to metadata.db?

Also, I notice that there are a bunch of datestamped .json files named "metadata_db_prefs_backup (DATE).json". Are these configuration files?

Thanks so much for the response!
Read Post # 9 first

I would try copying "metadata (2024_09_09 15_59_25 UTC).db" to "metadata .db", ditto the "metadata_db_prefs_backup (DATE).json" file. And then try pointing calibre at the library folder.

If that works do a Library check. If that's okay, delete the dated metadata.db and metadata_db_prefs_backup.json files.

Whilst I have File History enabled on my calibre libraries, I regard it as a last resort backup source for an entire library. However, on more than one occasion it has saved me a lot of grief when I've made a mistake when editing a format file… e.g. deleting the substantive content rather the head and tail bumph.

I use a file synchronisation tool (GoodSync) to backup the data I don't want to lose, which includes calibre libraries.

BR

Last edited by BetterRed; 09-18-2024 at 11:51 PM.
BetterRed is offline   Reply With Quote
Old 09-18-2024, 08:04 PM   #5
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,441
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Ouch! That sounds like your backup was on Google drive.

That really messes up Calibre because Calibre uses (##) for the {ID}

GD is not compatible with A calibre Library (see the FAQ) because it changes file names (adds (its own) .
theducks is offline   Reply With Quote
Advert
Old 09-18-2024, 10:00 PM   #6
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 11,444
Karma: 230178176
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by theducks View Post
Ouch! That sounds like your backup was on Google drive.

That really messes up Calibre because Calibre uses (##) for the {ID}

GD is not compatible with A calibre Library (see the FAQ) because it changes file names (adds (its own) .
The OP said the backup was on an external drive.
Sirtel is online now   Reply With Quote
Old 09-18-2024, 11:18 PM   #7
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,441
Karma: 58055868
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 Sirtel View Post
The OP said the backup was on an external drive.
Then where did the '( timestamp )' come from?
theducks is offline   Reply With Quote
Old 09-18-2024, 11:26 PM   #8
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 11,444
Karma: 230178176
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by theducks View Post
Then where did the '( timestamp )' come from?
From File History?
Sirtel is online now   Reply With Quote
Old 09-18-2024, 11:32 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,989
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Mister Underhill - I just re-read what you wrote.

If you Restore the library folder from File History it will restore its latest copy of sub-folders and files automatically… i.e. metadata(<most recent date>).db will be restored to metadata.db… etc.

Now I'm wondering of you're proposing to have calibre use the File History copy of the library. IMO that's not a good idea.

BR


Quote:
Originally Posted by BetterRed View Post
Quote:
Originally Posted by Mister Underhill View Post
Ah, okay. In the folder there are a bunch of metadata.db files, but they all include a datestamp in the filename. For instance, the latest one is "metadata (2024_09_09 15_59_25 UTC).db".

So should I just rename that to metadata.db?

Also, I notice that there are a bunch of datestamped .json files named "metadata_db_prefs_backup (DATE).json". Are these configuration files?

Thanks so much for the response!

I would try copying "metadata (2024_09_09 15_59_25 UTC).db" to "metadata .db", ditto the "metadata_db_prefs_backup (DATE).json" file. And then try pointing calibre at the library folder.

If that works do a Library check. If that's okay, delete the dated metadata.db and metadata_db_prefs_backup.json files.

Whilst I have File History enabled on my calibre libraries, I regard it as a last resort backup source for an entire library. However, on more than one occasion it has saved me a lot of grief when I've made a mistake when editing a format file… e.g. deleting the substantive content rather the head and tail bumph.

I use a file synchronisation tool (GoodSync) to backup the data I don't want to lose, which includes calibre libraries.

BR
BetterRed is offline   Reply With Quote
Old 09-18-2024, 11:46 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,989
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
Then where did the '( timestamp )' come from?
As Sirtel said, from File History:

Click image for larger version

Name:	Screenshot 2024-09-19 123901.jpg
Views:	61
Size:	419.5 KB
ID:	210882

BR
BetterRed is offline   Reply With Quote
Old 09-19-2024, 12:33 AM   #11
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,441
Karma: 58055868
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 BetterRed View Post
As Sirtel said, from File History:

Attachment 210882

BR
I did not even know that existed
theducks is offline   Reply With Quote
Old 09-19-2024, 12:35 PM   #12
Mister Underhill
Junior Member
Mister Underhill began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2024
Device: Kindle Paperwhite
First of all--thanks to everyone for taking the time and for the helpful suggestions!

Quote:
Originally Posted by BetterRed View Post
Whilst I have File History enabled on my calibre libraries, I regard it as a last resort backup source for an entire library.
Definitely a last resort situation. I'm normally pretty good about having a fairly current backup image of my HD too, but I got sloppy this time.

Anyway, to be clear, I have the File History on a NAS, not Google Drive. I'm still in the process of trying to rebuild this computer and wasn't really ready to do the full restore yet, so I downloaded the Calibre folder from the NAS instead of restoring it through File History. I guess File History is adding the datestamp for new versions of the file? It never occurred to me. The info that File History cleans things up when you restore accounts for my issue, so thanks, BetterRed. I've been lucky enough that File History is a "Break Glass in Case of Emergency" deal that I've only ever had to use to recover the odd file or folder.

Yesterday I tried renaming the most recent .db and .json files, then pointed Calibre at the folder. It worked, mostly, but after reading these posts this morning and doing the Library Check I see that there are some files within the library that also got date stamps added, which is causing a few problems. I'm going to try to restore the folder instead, and I'll report back the results.

Thanks again for all the helpful comments--you have saved me a lot of hair-pulling trying to figure this out.
Mister Underhill is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering the Calibre library on a lost partition fetito666 Library Management 3 01-17-2021 11:02 PM
Recovering library from old computer. Strat O'Saurus Library Management 4 02-12-2020 11:57 AM
Recovering Calibre Windows 64 after disk crash tytrate Library Management 1 02-03-2016 09:05 PM
help recovering my library babyz Calibre 12 06-03-2010 02:26 PM
help recovering my library babyz Calibre 1 06-01-2010 01:42 PM


All times are GMT -4. The time now is 08:23 AM.


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