Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-29-2021, 10:45 AM   #1
victor50
Member
victor50 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2014
Device: PC W10pro, Android Moto 5S
Two installations using the same bookstore

Because of the DRM problem I decided to downgrade my Calibre to 4.x and to install a 5.x version on my PC on another location, using the same bookstore location on my NAS. The two locations are connected by VPN and the same networkdrive is available on both locations. Still when installing the 5.x version didn't "see" the books installed. I could add books that are not seen on the other location. Now, the DRM issue seems to be resolved, so I installed the newest 5.10 (64) on both locations. Still no joy. I could add the two new books by draging the epubs to the masterlist, but that was it. The metadata is set to the bookstore on the NAS. There is only one metadata.db.
Now on the original location there also is a books.db that is actually loaded. On both locations there is a setting "database_path": "C:\\Users\\name/library1.db".
However on the new location there is no books.db! I copied the books.db to the new location, but it doesn't load. I would like to have this books.db in the library so the same database can be used by both installations.

Then on the new location there is an option Books > Export/Import calibre data.
There is no such option on the old location.

I think I will switch to a browserversion on the new location, when the serverside is stable. Still this is all very odd.
victor50 is offline   Reply With Quote
Old 01-30-2021, 04:10 AM   #2
aborel
Enthusiast
aborel has learned how to buy an e-book online
 
Posts: 29
Karma: 98
Join Date: Dec 2013
Device: Kobo Aura
Quote:
Originally Posted by victor50 View Post
Because of the DRM problem I decided to downgrade my Calibre to 4.x and to install a 5.x version on my PC on another location, using the same bookstore location on my NAS. The two locations are connected by VPN and the same networkdrive is available on both locations. Still when installing the 5.x version didn't "see" the books installed. I could add books that are not seen on the other location. Now, the DRM issue seems to be resolved, so I installed the newest 5.10 (64) on both locations. Still no joy. I could add the two new books by draging the epubs to the masterlist, but that was it. The metadata is set to the bookstore on the NAS. There is only one metadata.db.
The official documentation, and many practical cases along the years, indicate that this is a Bad Idea™ https://manual.calibre-ebook.com/faq...rked-drive-nas

You should get the Calibre database back to a non-networking drive before some corruption happens.
aborel is offline   Reply With Quote
Old 01-30-2021, 05:52 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by aborel View Post
You should get the Calibre database back to a non-networking drive before some corruption happens.
Sounds like some corruption has already happened.
JSWolf is offline   Reply With Quote
Old 02-04-2021, 02:46 AM   #4
victor50
Member
victor50 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2014
Device: PC W10pro, Android Moto 5S
There are two databases: books.db and metadata.db, the first one is stored in the userprofile and the location is stored there too in global.py.json Haven't tried to relocate. The second one can be relocated in the interface and is on my NAS where the books are stored. This has been working for years and they are not corrupted. My guess as a programmer is that the metadata is accessed via books.db. So the problem is that I can't find any (local) books.db on the second computer. Copying the books.db to the proper location on the second computer doesn't do anything.
victor50 is offline   Reply With Quote
Old 02-04-2021, 03:26 AM   #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,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by victor50 View Post
There are two databases: books.db and metadata.db, the first one is stored in the userprofile and the location is stored there too in global.py.json Haven't tried to relocate. The second one can be relocated in the interface and is on my NAS where the books are stored. This has been working for years and they are not corrupted. My guess as a programmer is that the metadata is accessed via books.db. So the problem is that I can't find any (local) books.db on the second computer. Copying the books.db to the proper location on the second computer doesn't do anything.
AFAIK books.db is not a calibre artefact. Does its schema resemble metadata.db, which is calibre's SQLite database. What are the file modification dates of the two .db files.

BR
BetterRed is offline   Reply With Quote
Old 02-04-2021, 03:55 AM   #6
victor50
Member
victor50 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2014
Device: PC W10pro, Android Moto 5S
books.db is half the size of metadata.db. However metadata.db is not visible as opened in Process Explorer while books.db is. Maybe it is closed when info has been obtained. Both have recent dates of change. books.db resides in the .\appdata\roaming\Calibre folder. Can't see the other Calibre setup from here, but as said it isn't in the folder and isn't loaded. I guess I will need a tool for analyzing the schemes. Don't have time for that.
victor50 is offline   Reply With Quote
Old 02-04-2021, 03:58 AM   #7
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,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
books.db is not used or even created by calibre.
kovidgoyal is online now   Reply With Quote
Old 02-04-2021, 04:29 AM   #8
victor50
Member
victor50 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2014
Device: PC W10pro, Android Moto 5S
I wonder about this... (see screenshot)
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	126
Size:	79.4 KB
ID:	185217  
victor50 is offline   Reply With Quote
Old 02-04-2021, 05:33 AM   #9
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,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
it will have been created by some third party plugin you are using run calibre as

calibre --ignore-plugins
kovidgoyal is online now   Reply With Quote
Old 02-08-2021, 06:34 AM   #10
victor50
Member
victor50 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2014
Device: PC W10pro, Android Moto 5S
Problem solved. Books.db turned out to be the calibre.db after all. It was set a long time ago with CALIBRE_OVERRIDE_DATABASE_PATH. I removed the override and copied and renamed books.db to the NAS-folder. Now I can use Calibre on both PC's, even at the same time. With the Calibre webclient I can only see book title and author. All other meta seems hidden. Then I have to download it, while I want to use the book on its location on the NAS so highlights etc are preserved. Unfortunately this seems not possible while using FBReader on my phone.
victor50 is offline   Reply With Quote
Old 02-08-2021, 06:52 AM   #11
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by victor50 View Post
I removed the override and copied and renamed books.db to the NAS-folder. Now I can use Calibre on both PC's, even at the same time.
Accessing a calibre library from two instances of calibre will destroy your calibre database. I really mean "will", not "might".
chaley is offline   Reply With Quote
Old 02-08-2021, 07:57 AM   #12
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,048
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
The only safe way to use Calibre on more than one PC might be to store it on a local USB drive. I'm not sure. A network drive or NAS even for one user at a time is a bad idea. A networked database used by more than one user / application program at the same time when it's single user like Calibre is a total disaster waiting to happen. You need a remote database server that's multiuser (Maria, MySQL, MSDE, MS-SQL, Oracle, DB2 etc, not SQLight, Access or similar set of files accessed directly by the application, and the application has to be somewhat aware. AFAIK Calibre doesn't support a database server API, it's single user and assumes total exclusive access to local files.
Quoth is offline   Reply With Quote
Old 02-08-2021, 11:20 AM   #13
victor50
Member
victor50 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2014
Device: PC W10pro, Android Moto 5S
Quote:
Originally Posted by chaley View Post
Accessing a calibre library from two instances of calibre will destroy your calibre database. I really mean "will", not "might".
I just added two books, converted them to EPUB and edited metadata, while on the other PC Calibre was open (and in server-mode). Database functions perfectly. The only thing is that it didn't refresh and there wasn't a possibility to force a refresh. After restart it did show the added books ok. Then, I think in the helpfile topic "CALIBRE_OVERRIDE_DATABASE_PATH" it says this is usefull when the external drive doesn't support locking, meaning that multiuser use is possible. Maybe @kovidgoyal could shed some more light on the matter
victor50 is offline   Reply With Quote
Old 02-08-2021, 11:28 AM   #14
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,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Why are you arguing with the Creator and one of the core code developers?

Locking has Internal (to app) uses and does NOT imply Multiple uses.
theducks is offline   Reply With Quote
Old 02-08-2021, 11:33 AM   #15
victor50
Member
victor50 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Sep 2014
Device: PC W10pro, Android Moto 5S
Quote:
Originally Posted by theducks View Post
Why are you arguing with the Creator and one of the core code developers? Locking has Internal (to app) uses and does NOT imply Multiple uses.
I didn't argue with the creator AFAIK. And posting facts can't be a problem I hope? Especially when someone says the database will be destroyed, when it isn't.

Last edited by victor50; 02-08-2021 at 11:35 AM.
victor50 is offline   Reply With Quote
Reply

Tags
books.db, export_import


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Calibre Installations in Windows 10 Program and Features zakropotch Calibre 2 03-21-2018 06:08 PM
Syncing Metadata Between Calibre Installations JonMoss Library Management 15 11-27-2013 02:28 PM
Request Expanding Memory Space For Application Installations birdspark enTourage Archive 4 04-11-2011 11:40 AM


All times are GMT -4. The time now is 09:49 AM.


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