![]() |
#1 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
![]()
Dear you guys,
I'm using calibre-server to run a synced database on a always-online computer. Code:
calibre-server --with-library "my_library" -p xxxx --auto-reload -t 120 ![]() It is a windows 7 PC. Is there away for the database to be released automatically and get updated? I'm not sure what the "-auto-reload" and -t timeout is for. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--auto-reload is for development. Since windows locks all open files your only way around is to stop the server, do the syn and start the server. Or use a linux/os x computer to run the server, where there is no locking problem.
|
![]() |
![]() |
![]() |
#3 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Thanks for confirmation. But I have no other machines. Anyway, I set up two windows schedules, which are repeated every hour (maybe longer when I don't edit the database much)
1) Kill calibre-server (wait 5 minutes for all files to be synced automatically) 2) Run calibre-server. This means that the server is offline 5 minutes every hour, ![]() ![]() // PS: I use Bittorrent Sync, so the sync is quite fast. |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
What I do is have a script (monit on linux) that watches the timestamp of the calibre database file in the sync'ed folder (dropbox for me). If the timestamp changes then monit runs a script to restart calibre.
My calibre restart script kills calibre, copies the database file to /tmp, sets the environment variable CALIBRE_OVERRIDE_DATABASE_PATH to that new copy, then starts calibre. Total calibre-off time is seconds. This technique ensures that the database file in the sync folder is open only for as long as it takes to make a copy, reducing sync failures to almost zero. A failure can still happen, but it would require two syncs within the monitoring window of the script. I don't know what you would use to watch timestamps on a windows system. |
![]() |
![]() |
![]() |
#5 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Be careful with the install it has a 'free offer' ![]() BR |
|
![]() |
![]() |
![]() |
#6 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
In my case watching for timestamp change is not helpful because the metadata.db is locked by existing calibre-server.exe instance and it is not updated by other software (bitsync for me).
I then need to have calibre-server.exe automatically killed (by windows task scheduler), then during the five minutes while calibre-server.exe is not running, the metadata.db file is free for updating (if any), then calibre-server.exe is automatically called for running again (for 55 minutes now). I know it sounds and is unprofessional and newbie, but that's all I can do. ![]() Last edited by nqk; 07-22-2014 at 11:24 PM. |
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Calibre-Server.exe and Virtual Library
Thank you all for your responses.
Can I use calibre-server.exe command line to show a certain Virtual Library? I created a number of virtual libraries and I would like to broadcast each to different ports. |
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
![]() ![]() Thank you! ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Porting Calibre's built-in web server to a remote server? | perryja | Related Tools | 6 | 05-02-2013 09:05 AM |
calibre-server: Doesn't server up newly added files | kaistian | Calibre | 5 | 03-17-2013 11:54 AM |
calibre-server OPDS catalog - manual move to web server | HaakonME | Related Tools | 5 | 09-21-2012 03:11 AM |
500 Internal Server Error accessing content server Calibre 0.8.8 | DaddyO57 | Calibre | 1 | 07-20-2012 06:08 PM |
Calibre-server port not open issue on Fedora server | stueyboy | Devices | 0 | 08-17-2011 04:57 PM |