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 11-10-2023, 01:22 PM   #1
Sys_eng
Member
Sys_eng began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2023
Device: Calibre
Restore custom columns

I successfully restored a library via
Library > Library Maintenance > Restore Database
but I stil can't see the custom cloumns. Any recommendations to restore the custom columns would be highly appreciated.
Sys_eng is offline   Reply With Quote
Old 11-10-2023, 01:36 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: 31,025
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Did you destroy metadata_db_prefs_backup.json?
That was YOUR structure backup and should have been used as part of the restore
theducks is offline   Reply With Quote
Advert
Old 11-10-2023, 09:42 PM   #3
Sys_eng
Member
Sys_eng began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2023
Device: Calibre
No, i still have it, but I am not sure how I can use it.
Sys_eng is offline   Reply With Quote
Old 11-10-2023, 10:05 PM   #4
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: 31,025
Karma: 60358908
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 Sys_eng View Post
No, i still have it, but I am not sure how I can use it.
It should have been used if it was in the normal place when you ran restore.
The issue now, is the metadata.opf backup file has been overwritten , losing the custom column info that was there.
Your only chance is if you Polished the books and embedded the metadata BEFORE your corruption. In that case, you can use the Metadata editor and fetch the books copy of the metadata
In bulk mode. Do only for books that you KNOW are correct. If the book is stale or wrong, that can ruin the better entry
tick Set Metadata from book files
theducks is offline   Reply With Quote
Old 11-10-2023, 10:40 PM   #5
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,710
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Sys_eng View Post
I successfully restored a library via
Library > Library Maintenance > Restore Database
but I stil can't see the custom cloumns. Any recommendations to restore the custom columns would be highly appreciated.
Where did you look for them?

Check Preferences->Add your own columns.

BR
BetterRed is online now   Reply With Quote
Advert
Old 11-11-2023, 01:44 PM   #6
Sys_eng
Member
Sys_eng began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2023
Device: Calibre
Quote:
Originally Posted by BetterRed View Post
Where did you look for them?

Check Preferences->Add your own columns.

BR
I looked there and I can see the the 4 custom columns that I created checked (with a check mark).
Sys_eng is offline   Reply With Quote
Old 11-11-2023, 02:23 PM   #7
Sys_eng
Member
Sys_eng began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2023
Device: Calibre
Quote:
Originally Posted by theducks View Post
It should have been used if it was in the normal place when you ran restore.
The issue now, is the metadata.opf backup file has been overwritten , losing the custom column info that was there.
Your only chance is if you Polished the books and embedded the metadata BEFORE your corruption. In that case, you can use the Metadata editor and fetch the books copy of the metadata
In bulk mode. Do only for books that you KNOW are correct. If the book is stale or wrong, that can ruin the better entry
tick Set Metadata from book files
Thank you for your response. I am new to Calibre. I was advised to restore the library via:
Library > Library Maintenance > Restore Database


Question Where the metadata.opf file is located? When I performed the respore, I had only 2 files in the library (1) metadata_db_prefs_backup.json and (2) metadata.db

and after the restore, I found 3 files (1) metadata_db_prefs_backup.json, (2) metadata.db (3) metadata_pre_restore.db

I am running Calibre on an iMac, and I have TimeMachine running all the time. (1) If metadata.opf is located somewhere other than the library folder, I will try to restore a previous verison of it. The only other folder associated with Calibre on teh operating system that I am aware of is the configuration folder (shown in the screenshot). In that folder, I could not find a metadata.opf

https://ibb.co/SKPg6br

(2) Question: I understand that Calibre is not designed for simultanuous access (therefore it's not recommneded to be hosted on a cloud service or NAS. Does that also apply to AppleTime Machine? i.e could Apply TimeMachine reuin the database?

When I looked at the metadata editor, I could not find the option "Set Metadata from book files" . Question: I would appreciate that you point me to it to give it a try.
Sys_eng is offline   Reply With Quote
Old 11-11-2023, 02:52 PM   #8
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: 31,025
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Thank you for your response. I am new to Calibre. I was advised to restore the library via:
Library > Library Maintenance > Restore Database


Question Where the metadata.opf file is located? When I performed the respore, I had only 2 files in the library (1) metadata_db_prefs_backup.json and (2) metadata.db

and after the restore, I found 3 files (1) metadata_db_prefs_backup.json, (2) metadata.db (3) metadata_pre_restore.db

I am running Calibre on an iMac, and I have TimeMachine running all the time. (1) If metadata.opf is located somewhere other than the library folder, I will try to restore a previous verison of it. The only other folder associated with Calibre on teh operating system that I am aware of is the configuration folder (shown in the screenshot). In that folder, I could not find a metadata.opf

https://ibb.co/SKPg6br
Restore expects everything else (other than the corrupted DB) to be in the normal place.

there is a metadata.opf is in each books folder (and cover.jpg). Those are the backup for that book metadata as shown in Calibre

Anything that tampers with the Library folder can corrupt. Only Calibre should make changes. The DB is the link between the entry and the files. Delays can allow a cart before horse condition, thus the rule of NOT on a Network storage.

BTW your screenshot is NOT of Calibre Library (the typical folder where books are)
theducks is offline   Reply With Quote
Old 11-11-2023, 03:01 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: 21,710
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Sys_eng View Post
I looked there and I can see the the 4 custom columns that I created checked (with a check mark).
So where can't you see the columns - book list, book details, elsewhere?

BR
BetterRed is online now   Reply With Quote
Old 11-11-2023, 05:03 PM   #10
Sys_eng
Member
Sys_eng began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2023
Device: Calibre
Quote:
Originally Posted by theducks View Post
Restore expects everything else (other than the corrupted DB) to be in the normal place.

there is a metadata.opf is in each books folder (and cover.jpg). Those are the backup for that book metadata as shown in Calibre

Anything that tampers with the Library folder can corrupt. Only Calibre should make changes. The DB is the link between the entry and the files. Delays can allow a cart before horse condition, thus the rule of NOT on a Network storage.

BTW your screenshot is NOT of Calibre Library (the typical folder where books are)
Thank you, agin for your response and clarrfification.

You are correct, the screenshot I sent is not from Calibre, I accessed it through
Preferences > Miscellaneous > Open calibre cofiguration folder

Now, I have 2 questions:

1- My undestanding is that given that I have already performed the restore, the metadata.opf for each book has been overwritten and the custom columns settings have been lost. However, if I have a backup of the library which includes the metadata.opf files before restoration, I should be able to restore the custom columns through the metadata editor. The issue is that I could not find the option "Set Metadata from book files" . Question: I would appreciate that you point me to that option.

2- Does backuping up the library using Time machine considered tampering with the Library folder? If no, that is goog. If, yes, what is the best practice to have a disaster recovery plan?
Sys_eng is offline   Reply With Quote
Old 11-11-2023, 05:09 PM   #11
Sys_eng
Member
Sys_eng began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2023
Device: Calibre
Quote:
Originally Posted by BetterRed View Post
So where can't you see the columns - book list, book details, elsewhere?

BR
In the book list, I can see all the books, all the columns (including teh custom columns), however, teh custom columns are empty, i.e. the data that I had (before restoration) is missing.
Sys_eng is offline   Reply With Quote
Old 11-11-2023, 06:41 PM   #12
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: 31,025
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I don't know how it would behave doing piece meal.
Kovid would need to really say.

I suspect you would destroy the metadata.db, restore the json and all the metadata.opf's, then rebuild

WAIT for the GURU to bless this plan
That will leave those items added after the backup to be redone
theducks is offline   Reply With Quote
Old 11-11-2023, 09:17 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: 45,320
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you have a backup use it to restore your library again. Restoring will restore custom columns and their data. The only way I knowof for that to fail is if you didnt actually do a restore but instead re-added the books to a library without the custom columns.
kovidgoyal is offline   Reply With Quote
Old 11-12-2023, 01:32 AM   #14
Sys_eng
Member
Sys_eng began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Nov 2023
Device: Calibre
Thank you so much, Kevin, for chiming in!
When you say "If you have a backup use it to restore your library again", doesn't that mean
doing that through Library > Library Maintenance > Restore Database on the main library folder? (which what I have already done)

or do you mean doing Library > Library Maintenance > Restore Database using a backup folder from x number of days before the library stopped loading normally?
Sys_eng is offline   Reply With Quote
Old 11-12-2023, 09:19 AM   #15
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,941
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Not 'restore database'. Deleting the entire library and restoring it from a backup.
ownedbycats is online now   Reply With Quote
Reply

Tags
custom columns, restore database


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Restore custom columns? the_Pan Library Management 12 10-17-2022 02:11 AM
Ratings Custom Columns Created From other Columns Tanjamuse Library Management 4 09-28-2020 12:57 AM
Custom sort order for custom columns? matjojo Library Management 5 11-24-2019 11:30 AM
Help Needed for Custom Columns Created From other Columns Tanjamuse Library Management 5 09-02-2018 06:19 PM
[Kindle] On device - how to restore columns? AussieTupp Devices 15 04-16-2017 08:43 AM


All times are GMT -4. The time now is 07:11 AM.


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