05-21-2010, 12:56 AM | #1 |
Guru
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
|
Using Calibre as a client for another Calibre instance?
I love Calibre and currently have it running on my Windows Home Server. I can manage it using remote desktop and download books on my iPhone using Stanza without having to connect the iPhone to the physical machine running Calibre. One little problem, though. I purchased a Sony ebook reader through yesterday's woot deal. It should arrive in the next couple of weeks so I'm getting prepared, and unfortunately the Sony doesn't have wifi to download books.
I realize Calibre can sync to the Sony easily enough if it's connected to the computer, but I rarely physically access my WHS. I'd like to keep my library consolidated on the WHS, and I keep Calibre runnin 24/7 so I can download on the iphone whenever I like, but now I also need a convenient way to get books onto the Sony. Ideally, I'd be able to run an instance of Calibre on my laptop that connects to the instance of Calibre running on the WHS for library access rather than recreating my library locally. Is this possible to do? I'd even be happy with a simple read-only view of the library that can just sync and not do any adding or editing. The one thing I can't do is share the database file from the server instance because Calibre locks the file as long as it's running and the server instance is always running. Otherwise, I'm afraid that my only option may be to rely on Remote Desktop's ability to share USB devices with remote computers. Unfortunately that's often been buggy for me in the past and WHS is based on comparatively ancient technology (Windows Server 2003) and may not fully support device sharing scenarios. Help! I really don't want to have to physically access my WHS all the |
05-21-2010, 09:59 AM | #2 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
I've not tried this, but maybe you should have a look at using Calibre2OPDS together with a Calibre library on a shared network drive. I'm thinking you should be able to run Calibre on your workstation with the library location being on the shared drive (as in "on your server"), and the server running, well, the server I linked to above.
|
Advert | |
|
05-21-2010, 05:29 PM | #3 |
Connoisseur
Posts: 94
Karma: 10
Join Date: May 2010
Device: Win 10
|
Take a look at the sticky thread about Calibre-server. Here in Post #125 I asked about running *JUST* calibre-server on WHS and the GUI on a client machine. KovidGoyal says it should work, since the server process will be Read-Only and the client will be Read-Write.
I think that will work for you as well - by pointing your GUI Calibre to the WHS directory for its library. If you are *VERY* careful, you might be able to run the GUI on multiple machines - but like Ghostbusters, NEVER CROSS THE STREAMS I would NOT recommend this myself though - as you must be 100% certain that only one machine has Calibre running at any time. (There's another thread here which goes through that multi-client idea in excruciating detail.) HTH, Richard |
05-21-2010, 05:45 PM | #4 |
Guru
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
|
calibre-server is just the web front-end, right? That might work. The only reason I have calibre running 24/7 is for stanza access. I could do gui management stuff from my laptop pointing to the server shares for ebook and database storage. I'll play with that tonight and see if it satisfies my needs.
It sure would be nice if calibre supported mysql, postgresql, sql server express, or similar as a database target, though. That would remove database locking/corruption risks from multi-client scenarios, though you'd still have to deal with stale data, actual ebook file access, etc. |
05-21-2010, 06:02 PM | #5 | |
Connoisseur
Posts: 94
Karma: 10
Join Date: May 2010
Device: Win 10
|
Quote:
Please do post back - either here or in the other thread. I probably won't have a chance to try it this weekend I presume we'll still want SRVANY to get calibre-serve running as a service on the WHS box, but that's more of a detail. Richard |
|
Advert | |
|
05-22-2010, 12:22 AM | #6 |
Guru
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
|
I just got this all set up and working. Warning! Before you do anything, make a backup of all of the data in Calibre's library location as well as the metadata.db database. I only backed up the database and I lost ~12 books in the process. I was able to recover 11 of them from non-Calibre sources, but I should've backed up first. Anyway, here's what I did:
At this point, you now have Calibre setup on your client machine but with its database and files stored on the WHS. Next, we want to setup the calibre-server in order to provide access to Stanza, Trook, or just web browsing.
Note about putting metadata.db on WHS shares: The DE migrator service can't move files that are locked by a process. Normally this isn't an issue because the service will keep trying over the next ~24 hours and at some point in there most processes will release whatever files the have locked. Calibre's GUI does not do this -- it locks the database as soon as it starts and holds onto it until it closes. If you're running the Calibre GUI 24/7 on your WHS like I was, within a day or so you'll start getting warnings on the WHS console about not being able to migrate files. In theory, since calibre-server only takes a read-only lock on the file the DE migrator should play nicely. However I'm not sure how nicely it will play with duplication so for now I've put my database on a non-duplicated share. |
05-22-2010, 03:06 PM | #7 | |
Connoisseur
Posts: 94
Karma: 10
Join Date: May 2010
Device: Win 10
|
Quote:
Perhaps we can get Kovid to weigh in on why the service doesn't run properly as another user? I too don't like the idea of leaving it running as admin! Richard |
|
05-22-2010, 04:57 PM | #8 |
creator of calibre
Posts: 44,617
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sorry guys, I'm not a windows user, so I really have no idea why it will only run as admin
|
05-22-2010, 05:20 PM | #9 | |
Connoisseur
Posts: 94
Karma: 10
Join Date: May 2010
Device: Win 10
|
Quote:
I see the server process start and then exit, so I'm hoping if we could get a log we could figure out why it's unhappy. Thanks again! Richard |
|
05-22-2010, 06:07 PM | #10 | |
Guru
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
|
Well, I was able to get the error that calibre-server throws when it's run as local system or network service. I created a batch file that echos the value of CALBIRE_OVERRIDE_DATABASE_PATH and the output of calibre-server to a temp log file, and I got this:
Quote:
|
|
05-22-2010, 06:28 PM | #11 |
creator of calibre
Posts: 44,617
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No it logs only to stderr/stdout
|
05-22-2010, 06:31 PM | #12 |
creator of calibre
Posts: 44,617
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It does log http access/errros but those logs wont help debug a startup problem. If you want to access them they'll be in the calibre config directory (accessible via preferences->advanced)
|
05-22-2010, 07:58 PM | #13 | |
Guru
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
|
I'm a little bit closer, but this is turning into quite the mess. What I've done so far:
At this point I'm getting this error: Quote:
I'm about ready to give up on this and just keep running the service as administrator. At least that worked |
|
05-22-2010, 08:13 PM | #14 | |
Connoisseur
Posts: 94
Karma: 10
Join Date: May 2010
Device: Win 10
|
Quote:
7c7 < database_path = 'C:\\Documents and Settings\\NetworkService/library1.db' --- > database_path = 'C:\\Documents and Settings\\Administrator/library1.db' 23c23 < library_path = None --- > library_path = u'//Server/eBooks' 27c27 < language = None --- > language = 'en' 55c55 < installation_uuid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' --- > installation_uuid = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy' I don't understand the database_path bit at all. None of those files exist? Confused, Richard |
|
05-22-2010, 08:22 PM | #15 |
Guru
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
|
The database path is a configuration item (not exposed in the UI for some reason) to move the database to a different location. I don't know if it's actually used anywhere, since it defaults to the user's profile directory + library1.db but the database always ends up in the root of the library path. I've been using the environment variable CALIBRE_OVERRIDE_DATABASE_PATH to move the database to a location other than the library path. I initially did that due to the DE migrator problem I mentioned earlier so that the GUI would not block WHS's drive rebalancing (moved the database to a non-share directory on c:, for example). It's potentially unnecessary with this approach if you don't mind your metadata.db living in the library root. Personally I like the idea of keeping the database separate from the files.
When I changed the config location above using the environment variable, I pre-populated that location using the administrator's configuration files. Last edited by toddos; 05-22-2010 at 08:24 PM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding ODPS client to calibre (Bug #1665, Download from Bookshelf/Stanza servers) | hakan42 | Calibre | 11 | 12-05-2010 01:19 PM |
calibre server and client synch? | machstem | Calibre | 12 | 09-15-2010 07:27 PM |
Calibre metadata.calibre not allowing updates | Chuckels550 | Calibre | 10 | 08-09-2010 06:12 PM |
An instance where PDF works | J. Strnad | Kobo Reader | 10 | 07-16-2010 10:05 PM |
calibre command line utilities and calibre defaults | astrodad | Calibre | 2 | 08-07-2008 04:27 PM |