Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2022, 07:42 AM   #1
PatrickMarq
Junior Member
PatrickMarq began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2022
Device: Kobo
Question Move the library to other storage path

I’m quite new to calibre and calibre-web, but I got them up and running and find them wonderful software.
At last I have a decent overview of all my books.

But when setting up I dit not take in consideration the size I needed.
So need to move the library to a NAS.

I think following steps are needed:
  • Stop the content-server and the web-server
  • Move the directory to the NAS
  • Edit the path in the startup of the content-server
  • Edit the path in the web-server
Start both services.

Is this correct ?
Thank you
PatrickMarq is offline   Reply With Quote
Old 09-19-2022, 03:25 AM   #2
PatrickMarq
Junior Member
PatrickMarq began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2022
Device: Kobo
To anser my own question, Yes those where the correct steps
PatrickMarq is offline   Reply With Quote
Old 09-19-2022, 05:06 AM   #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,868
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This page in the calibre FAQ might be of interest.
https://manual.calibre-ebook.com/faq...rked-drive-nas
chaley is offline   Reply With Quote
Old 09-19-2022, 09:11 AM   #4
MightyDuck
Junior Member
MightyDuck began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2022
Device: Kobo Libra H2O
I'm gonna use this thread since my problem is related, hope that Patrick won't mind. I would like to achieve the same goal but I can't get it work. I have a Raspberry Pi and a network shared folder. By performing the same steps as suggested I got a bunch of errors while running the server:

- sudo mount -t cifs -o nobrl,username=user,password=password,uid=pi,vers= 1.0 //NAS_IP/NAS_DIR ~/library

- export CALIBRE_OVERRIDE_DATABASE_PATH="/$HOME/.../metadata.db"

- sudo calibre-server --trusted-ips 192.168.178.0/24 --enable-local-write ~/library

so basically I mount the network shared folder with SMB (where the library should be located). Then I set the path of the database (local to the PI) and I try to fire up the server (I tried both with and without root permissions). Where I'm getting it wrong? Thank you so much.
MightyDuck is offline   Reply With Quote
Old 09-19-2022, 09:18 AM   #5
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: 30,203
Karma: 57978778
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
OMG 2 users ignoring tips from one of the major Calibre developers.

WHEN, not IF, you will have corruption. Calibre is not network drive safe.

Please don't come back here when it happens.
theducks is offline   Reply With Quote
Old 09-19-2022, 10:34 AM   #6
MightyDuck
Junior Member
MightyDuck began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2022
Device: Kobo Libra H2O
Quote:
Originally Posted by theducks View Post
OMG 2 users ignoring tips from one of the major Calibre developers.

WHEN, not IF, you will have corruption. Calibre is not network drive safe.

Please don't come back here when it happens.
This is why database is local and only library is on NAS. This way should be safe.
MightyDuck is offline   Reply With Quote
Old 09-19-2022, 10:49 AM   #7
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,868
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by MightyDuck View Post
This is why database is local and only library is on NAS. This way should be safe.
Nope.

The most common error is a failure of the network file system to completely / correctly implement link and locking semantics. Calibre uses these to atomically rename author and title directories. When they fail, files (books, covers, etc) are left in the old directory thereby disappearing from calibre. Repairing the breakage is tedious.

One safe way to do what you want is keep the library on a local drive and from time to time sync it to the NAS. You must ensure that the calibre server on the NAS is not running when you do the sync. You must also ensure that no changes are made to the library by the content server, as they will be lost by the sync.

Even better is to run full calibre (GUI and server) on the NAS and connect to it using some remote desktop.
chaley is offline   Reply With Quote
Old 09-19-2022, 11:37 AM   #8
MightyDuck
Junior Member
MightyDuck began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2022
Device: Kobo Libra H2O
So basically periodically rsync on the library directory or exporting all the data with calibre-debug --export-all-calibre-data. The server must be stopped in both cases? Using rsync I think it can keep running as long as you don't make changes during the copy procedure.

Thank you very much for the info by the way!
MightyDuck is offline   Reply With Quote
Old 09-19-2022, 11:57 AM   #9
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,868
Karma: 7036359
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by MightyDuck View Post
So basically periodically rsync on the library directory or exporting all the data with calibre-debug --export-all-calibre-data. The server must be stopped in both cases? Using rsync I think it can keep running as long as you don't make changes during the copy procedure.
Use any sync program you want. Best is one that does a one-way sync of only the changed files calibre-machine -> server. Don't mirror. I wouldn't use calibre export unless your library is very small because it will copy everything, not just the changed files.

You probably should sync the calibre configuration directory as well, to pick up changed options. The command line args used to start the server will override the library paths in the configuration.

Calibre on the machine with the library must be stopped before the sync to be sure the info in the config directory and the db are up-to-date and won't change in the middle of the sync.

The server must be stopped while metadata.db and the configuration directory are being updated. I think it is safe to leave it running while the library directories are being updated, but personally I wouldn't take the chance of hitting some kind of lock.

Note that some web client viewer operations can modify the library, particulary reading positions for syncing between multiple instances of the viewer. These are stored by the server and thus will be lost.

Quote:
Thank you very much for the info by the way!
You are welcome.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cold Storage, not active path remy Library Management 6 07-18-2021 03:16 AM
Move file : invalide folder path un_pogaz Sigil 13 01-02-2021 01:54 AM
PRS-T2 books storage default path andreaaaaaa Sony Reader 0 10-16-2012 03:17 AM
How to move files from internal storage to SDHC card? (Move Files Here button not wor Nick_Djinn enTourage Archive 5 07-16-2010 10:45 AM
How to move public library book from ADE to Sony Library? mom2three Sony Reader 3 06-30-2010 05:26 AM


All times are GMT -4. The time now is 06:48 PM.


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