View Single Post
Old 05-12-2020, 08:01 PM   #2
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,195
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by cmartin616 View Post
Hello,

I am using Calibre to warehouse my ebooks on Ubuntu Server 18.04. I am not using Calibre Content Server to read via the web as I am using Calibre-Web for that purpose. I've noticed Calibre-Web being quite slow so I dug around a bit and realized Calibre creates the metadata.db database in the same location as the library. However, my library is on a NAS and I don't want the metadata.db to co-locate as I'd prefer it be local to Calibre. I've tried all sorts of methods to set the environmental variables but I can't seem to get Calibre (via GUI) or calibredb to recognize the CALIBRE_OVERRIDE_DATABASE_PATH or CALIBRE_CONFIG_DIRECTORY variable. I've tried setting it in /etc/environment. I've tried setting it in ~/.profile. I've tried creating a shell script to export CALIBRE_OVERRIDE_DATABASE_PATH prior to loading the GUI. I've always tried logging out/in after these changes. Nothing works.

More specifics:
Spoiler:
  • Calibre is installed within the main OS/default locations originally by a headless user that no longer exists. (/opt/calibre and owned by root:root)
  • Calibre-Web is run in a Docker container with a dedicated user and group. This user is a service account with no home.
  • LazyLibrarian is run in a Docker container with a different dedicated user and group. This user is a service account with no home.
  • My library is located on my NAS. I have this drive mounted in Ubuntu. The mount directories are owned by a number and the group users. I believe this is because of the way they are mounted via fstab.
  • Calibre has a single library pointing at the NAS and can read/write.
  • Calibre-Web and LazyLibrarian can read/write to the NAS as well.
  • Calibre's config directory (via GUI) is my admin user's .profile directory. Does this get created when the GUI is run by a user?
  • calibredb says there is no saved library path when run as any user except my admin user. LazyLibrarian import does nothing (I assume due to this same library path issue). The LazyLibrarian Docker shell recognizes calibredb but, again, no saved library path.

Ideally, I'd like to move the metadata.db onto a Ubuntu machine (/opt/calibre-config/data). I'd also like to move the configs (/opt/calibre-config/config) to a general location that would be readable by the necessary users. Does anyone have a documented procedure that can help me resolve these issues?


Thanks!
Start here:

https://manual.calibre-ebook.com/faq...rked-drive-nas

Pay attention to the third paragraph that starts with "If you must...."

bernie
gbm is offline   Reply With Quote