Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-26-2018, 03:48 PM   #1
dmbreakey
Junior Member
dmbreakey began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2018
Location: Colorado Springs, CO (USA)
Device: Generic epub
Thumbs down Is it safe to run two instances of Calibre sharing a common database?

I have what could be considered a curious setup, maybe:
  • A local folder on my desktop stores my library; this is synced up to a remote server via NextCloud.
  • I run the Calibre GUI on my desktop to manage the library.
  • I run Calibre, in content-server mode, on the remote PC, for convenient access via Calibre Companion.
Out of concern for maintaining database integrity, my desktop install is wrapped in a script that first terminates the Calibre content server running on the remote system, then starts Calibre locally; once the GUI exits, the script then sleeps for 60 seconds, to allow time for the NextCloud sync to finish, then restarts Calibre in content-server mode on the remote PC. I've considered hacking it to use inotify, but that just seems to be asking for trouble...

If anyone's wondering, all my PCs are Linux-based, so this kind of cross-network manipulation is pretty trivial. A combination of public key login, a systemd unit file and carefully constructed sudoers files...

I've had it running this way for a solid six months, and it seems to work really well so I'm not looking to fix a problem. But I'm wondering if maybe I've solved a problem that doesn't actually need to be solved.

If I just leave the remote Calibre running constantly, will it handle it safely if/when the NextCloud sync updates the library files? What little I've found online implies not, whichis why I decided to do it this way.

Before anyone points it out, I'm aware I could just run the remote server constantly, and connect to it using the local Calibre desktop, but I've got a number of reasons for running it this way--not least of which is it serves as a rudimentary backup solution.

Sorry if I'm re-asking a question, but I've been looking for this for months, so I don't think anyone's asked it already...

dmbreakey is offline   Reply With Quote
Old 05-26-2018, 05:47 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: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
NO!

The data is cached in memory. If you change on, the other has no clue that it happened and any changes there will trash the first instances changes.

Use the content server to access the library from additional locations (there is no reasonable limit on users)
theducks is offline   Reply With Quote
Advert
Old 05-26-2018, 07:17 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: 20,459
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@dmbreakey - I would be wary of running Cloud Synch continuously against the calibre libraries. The standard recommendation (here) is to terminate/pause syncing when the calibre GUI or content server are running.

I'd probably look at doing the synch between the workstation and server copies of the libraries periodically, maybe overnight, with neither the calibre GUI or the content server running on their respective hosts.

BR
BetterRed is offline   Reply With Quote
Old 05-28-2018, 01:21 PM   #4
dmbreakey
Junior Member
dmbreakey began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2018
Location: Colorado Springs, CO (USA)
Device: Generic epub
That's exactly what I was concerned about; so the solution I'm using is the "best" one given the restrictions I'm working with. Thank you!

@theducks - you seem to be worried that I'm trying to run an instance and then have the database change out underneath it while it is running--I am very explicitly trying to avoid that, at all costs. Believe me, I know firsthand that if an application isn't designed to cope with that, you're just courting trouble. And I never found confirmation Calibre was designed to work that way, so assumed it wasn't.

I know I could use a remote Calibre instance running in a permanent content server mode but this setup I'm using is a holdover from when I had been using an alternative PHP-based OPDS catalog that backended into the Calibre DB (COPS, I believe, which I stopped using because I finally got Calibre Companion working properly).

I just haven't had the time to spare to investigate remastering this setup, and this solution has worked perfectly for me for quite a while.
dmbreakey is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing plugin in Calibre removes it from all instances of Calibre oblox Calibre 9 09-09-2016 05:39 AM
Is there a safe way to setup read only sharing of library LadyKate Calibre 4 05-02-2015 08:17 AM
Is it safe for two copies of Calibre to access the same database? Halo Calibre 7 01-31-2013 01:03 PM
Two instances of Calibre Ortep Calibre 4 03-25-2011 06:10 PM
HandStory safe to run from flash ROM? daught Reading and Management 1 05-09-2003 02:45 PM


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


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