![]() |
#1 |
Member
![]() Posts: 13
Karma: 10
Join Date: Oct 2012
Device: nook simple touch
|
Recreating my Library on my server takes weeks now
There is my huge library on my server connected via NFS.
OK, I know, don't use a network storage for your calibre library. It killed the database once or twice a year, recreating with calibre on my macbook took 2-3 days - that's OK and adding new books worked flawless afterwards. Now I'm at 4% after 3 days with calibre 2.31.0. (3rd run) - this will take months from now on. Is there any way to recreate the database using calibre-server on my linux server? So there is a faster access to my ebooks to a local harddisk than gbit ethernet? Is there a way to connect the local calibre on my macbook to calibre-server to add new books? Is there a way, like a watch folder, to add books on a headless calibre-server on my linux server? My current situation is - there is no calibre-server running on my server. There is my eBooks-folder on my server served by NFS to my macbook. Calibre on my macbook is the only way to manage and add the ebooks. Bicbucstriim http://projekte.textmulch.de/bicbucstriim/ as I understand it "reads" the database, is the access point for my iPhone, Android, S60, symbian, maemo, nook, kindle, readr and is working really well to transfer my ebooks. Last edited by mohataj; 09-05-2015 at 08:28 PM. Reason: more info |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,912
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Investigate the CLI options and run those from a (server) Terminal session
Use you MAC (standalone) to prepare Books for transfer. Cleanup edits, Polish... Then Export the books and place the clean EPUBs into the Auto Add folder on the server |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
calibre's Auto-add folder on the server only works if you have the calibre GUI running (headless).
![]() I suggest exporting books to a temporary folder on the server (shared over NAS) and using a cron/systemd job backed by inotify to add all books added to that folder, and clean them up afterward. calibre has many useful CLI tools ![]() |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 13
Karma: 10
Join Date: Oct 2012
Device: nook simple touch
|
OK, calibre-server --with-library=/mnt/3TB/eBooks shows - nothing, there is even no load, is this command indexing my folder?
"calibre's Auto-add folder on the server only works if you have the calibre GUI running (headless)" this is exactly what I want - how do I do this? |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibredb restore_database
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
But if you were trying to fix the library, following my advice by using the `calibredb restore_database` command, then the best way to start would be to reread my post. And read the manual: http://manual.calibre-ebook.com/gene...calibredb.html Quote:
Sit back. Watch contentedly as your server's RAM and cpu get flushed down the toilet because you didn't follow my advice and use the CLI tools instead. This is exactly what you DON'T want!!! Running GUI programs headless while piped to a dummy (virtual) screen is a weapon of last resort, for programs which have no sane way of being used in a server environment! calibre, fortunately, has the backend implementation necessary to be used headless, without the GUI. |
||
![]() |
![]() |
![]() |
#7 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Save them inside a folder on your server, e.g. /tmp/calibre-intake/ Then adding them to your linux server using the CLI as I said above. Code:
calibredb add -r --one-book-per-directory /tmp/calibre-intake/ rm -rf /path/to/ebook-folder/* Code:
while inotifywait -e create /tmp/calibre-intake; do calibredb add -r --one-book-per-directory /tmp/calibre-intake/ rm -rf /tmp/calibre-intake/* done Last edited by eschwartz; 09-06-2015 at 12:12 AM. |
|
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 13
Karma: 10
Join Date: Oct 2012
Device: nook simple touch
|
thanks for your replies, recreating the database by commandline took me 8 days now and it's reliable and nice to see the progress.
Is there any way to use calibre with a write protected metadata.db? So I have a read only calibre for use with calibre companion. |
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
Calibre server does not require write access. |
|
![]() |
![]() |
![]() |
#10 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
calibre-server will only ever write to the database when performing an automatic schema upgrade after a calibre update changes the layout of the database... which happens only rarely.
![]() If you really want to prevent the database from being modified, you could always use the environment variable "CALIBRE_OVERRIDE_DATABASE_PATH" pointed at a temporary copy which can be trashed. Don't modify any metadata while you do this ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sync library between server and laptop | cptnemo | Library Management | 4 | 05-05-2013 02:33 AM |
Recreating library on new computer? | jeather | Calibre | 5 | 01-31-2013 02:22 PM |
central server library | Dahaniel | Library Management | 7 | 09-03-2011 03:51 AM |
Library on NAS server? | bous | Calibre | 5 | 11-26-2009 05:03 AM |
Library takes 5 minutes to open the reader! | accipiter | Sony Reader | 1 | 02-02-2009 12:46 AM |