Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-11-2010, 04:30 PM   #1
gkbeer
Enthusiast
gkbeer began at the beginning.
 
Posts: 27
Karma: 30
Join Date: Mar 2006
Device: Kindle, iPod Touch,
Can a library folder be operated on by two sessions of calibre?

Specifically, I have a Ubuntu box that operates a Calibre content server.
It also shares the folder containing the library out to the home network.

For the purpose of updating the library:
I want to run Calibre interactively from a laptop, with Calibre referencing the library folder, shared from the content server.

Do I need to stop the content server for the time that I am running Calibre interactively on the laptop?

No doubt both the content server and the laptop need to be running the same version of Calibre.
gkbeer is offline   Reply With Quote
Old 09-11-2010, 05:03 PM   #2
EricLandes
Connoisseur
EricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipse
 
Posts: 95
Karma: 8282
Join Date: Jan 2010
Device: Kindle PW, Kobo Aura HD, Galaxy Note 10.1
Quote:
Originally Posted by gkbeer View Post
Specifically, I have a Ubuntu box that operates a Calibre content server.
It also shares the folder containing the library out to the home network.

For the purpose of updating the library:
I want to run Calibre interactively from a laptop, with Calibre referencing the library folder, shared from the content server.

Do I need to stop the content server for the time that I am running Calibre interactively on the laptop?

No doubt both the content server and the laptop need to be running the same version of Calibre.
Only one installation should operate on a given library at any one point in time.

The key to the problem is metadata.db. If that file is open from one computer, changes made with the 2nd computer won't be recognized. You'll be able to successfully add files into the Calibre file system, but the original machine won't know they're in the database.

So, not a recommended practice.

What I do is run a small, secondary installation on my laptop. I add the new content there and get all the metadata the way I like. Then, I save to disk onto my server.

Then, I use the Calibre installation on the server and add the files there. It's the safest way if you want to run a content server.
EricLandes is offline   Reply With Quote
Advert
Old 09-11-2010, 05:03 PM   #3
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: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You can run a content server against a database that is open read/write by calibre. The content server checks if the DB has changed and does its work again when the DB changes.

Two instances of calibre cannot access the database in read/write mode and expect good things to happen.

Although running the same version isn't always necessary, I, as a developer, am incapable of giving you the rules. That tells me that running the same version is a good idea.

Today has been a bad day for me and clarity. Do I make sense?
chaley is offline   Reply With Quote
Old 09-11-2010, 05:15 PM   #4
EricLandes
Connoisseur
EricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipse
 
Posts: 95
Karma: 8282
Join Date: Jan 2010
Device: Kindle PW, Kobo Aura HD, Galaxy Note 10.1
Quote:
Originally Posted by chaley View Post
You can run a content server against a database that is open read/write by calibre. The content server checks if the DB has changed and does its work again when the DB changes.

Two instances of calibre cannot access the database in read/write mode and expect good things to happen.

Although running the same version isn't always necessary, I, as a developer, am incapable of giving you the rules. That tells me that running the same version is a good idea.

Today has been a bad day for me and clarity. Do I make sense?
How do I run Calibre without opening the DB in read/write mode? Does just running the content server do this?
EricLandes is offline   Reply With Quote
Old 09-11-2010, 05:19 PM   #5
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes run the content server from the command line

calibre-server
kovidgoyal is offline   Reply With Quote
Advert
Old 09-11-2010, 05:20 PM   #6
EricLandes
Connoisseur
EricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipseEricLandes can illuminate an eclipse
 
Posts: 95
Karma: 8282
Join Date: Jan 2010
Device: Kindle PW, Kobo Aura HD, Galaxy Note 10.1
Quote:
Originally Posted by kovidgoyal View Post
yes run the content server from the command line

calibre-server
Cool, thank you.

I need to explore the command-line portions more. I do everything exclusively from the GUI. Which is odd, because I'm a command-line kind of guy.
EricLandes is offline   Reply With Quote
Old 09-11-2010, 10:25 PM   #7
Trickery
Pew Pew!
Trickery has a complete set of Star Wars action figures.Trickery has a complete set of Star Wars action figures.Trickery has a complete set of Star Wars action figures.
 
Trickery's Avatar
 
Posts: 29
Karma: 270
Join Date: Aug 2010
Device: Kindle v3
Quote:
Originally Posted by EricLandes View Post
What I do is run a small, secondary installation on my laptop. I add the new content there and get all the metadata the way I like. Then, I save to disk onto my server.

Then, I use the Calibre installation on the server and add the files there. It's the safest way if you want to run a content server.
Ha, that would have been great to know awhile back. All I did was share the Calibre AppData folder and the folder containing all my eBooks over the network. Just run SyncToy, rsync, Allway Sync, whichever sync product you like.. and my server, laptops, and other desktop computers all have identical application settings and libraries at all times.

That way if I change some of the display settings/convert settings on one Calibre instance, they get transferred to the others.
Trickery is offline   Reply With Quote
Old 09-13-2010, 12:16 AM   #8
gkbeer
Enthusiast
gkbeer began at the beginning.
 
Posts: 27
Karma: 30
Join Date: Mar 2006
Device: Kindle, iPod Touch,
Quote:
Originally Posted by kovidgoyal View Post
yes run the content server from the command line

calibre-server
With all the other responses I'm not sure if this reply was to my initial query. gkbeer

To clarify:

If I run Calibre-server from the command line on my home server (actually as a daemon), and share the library folder from that server as well. I may, from any other machine on my home net, run Calibre, interactively, and edit the library, of the server, without shutting down Calibre-server.

Usual caveats of keeping all systems on the same version of calibre apply.

Edit: New question, Can a single Calibre database be edited by multiple interactive sessions of Calibre?

Last edited by gkbeer; 09-13-2010 at 12:26 AM.
gkbeer is offline   Reply With Quote
Old 09-13-2010, 01:17 AM   #9
Trickery
Pew Pew!
Trickery has a complete set of Star Wars action figures.Trickery has a complete set of Star Wars action figures.Trickery has a complete set of Star Wars action figures.
 
Trickery's Avatar
 
Posts: 29
Karma: 270
Join Date: Aug 2010
Device: Kindle v3
I believe both of your questions have been addressed.

Question:
Quote:
Originally Posted by gkbeer View Post
If I run Calibre-server from the command line on my home server (actually as a daemon), and share the library folder from that server as well. I may, from any other machine on my home net, run Calibre, interactively, and edit the library, of the server, without shutting down Calibre-server.
Answer:
Quote:
You can run a content server against a database that is open read/write by calibre. The content server checks if the DB has changed and does its work again when the DB changes.
Question:
Quote:
Originally Posted by gkbeer View Post
Edit: New question, Can a single Calibre database be edited by multiple interactive sessions of Calibre?
Answer:
Quote:
Originally Posted by EricLandes View Post
Only one installation should operate on a given library at any one point in time.

The key to the problem is metadata.db. If that file is open from one computer, changes made with the 2nd computer won't be recognized. You'll be able to successfully add files into the Calibre file system, but the original machine won't know they're in the database.

So, not a recommended practice.
So yes, if you run the content server as a daemon you have no problem making changes to the library. The content server daemon will use the updated library. Also to answer your second question, you can have multiple computers with calibre pointing to a network folder making changes to a library. Just don't have calibre running on multiple computers or make changes at the same time or it could cause problems.
Trickery is offline   Reply With Quote
Old 09-13-2010, 01:34 AM   #10
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 gkbeer View Post
If I run Calibre-server from the command line on my home server (actually as a daemon), and share the library folder from that server as well. I may, from any other machine on my home net, run Calibre, interactively, and edit the library, of the server, without shutting down Calibre-server.
Yes .

Quote:
Originally Posted by gkbeer View Post
New question, Can a single Calibre database be edited by multiple interactive sessions of Calibre?
Not at the same time. Only one session of calibre should interact with the calibre database at any given time. Bad things may happen if multiple users access/modify the database from multiple locations at the same time.
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Library Folder miguel_roboso Calibre 30 10-06-2017 01:23 AM
Moving library folder outside calibre - than change within. myle00 Calibre 6 08-16-2011 07:08 AM
Reprocessing Calibre Folder jflatto Calibre 1 07-03-2010 08:08 PM
Saving Filenames in Calibre Library Folder junkyardwillie Calibre 2 01-07-2010 07:51 PM
Sony Reader Library Folder Locations stevewilkinson Sony Reader 3 12-31-2009 07:42 AM


All times are GMT -4. The time now is 10:25 PM.


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