[Feature Request] Support for split Database/Library locations
Hi there, As my "application server" uses SSDs and has limited space, and my file server has much more space, i am using the "CALIBRE_OVERRIDE_DATABASE_PATH" option.
My database resides local to the application server and my books are stored on the file server. Unfortunately, since calibre-web appears to look for the books as subfolders of where the database is located, it can pull the book list from calibre's databse, but then can't find the books.
Is there any way to introduce an option to specify "database location" as well as "books location" if it's not the default?
I wasn't aware of a setting like this. Yes, there is a way of implementing it (later)
I too would love this feature!
+1 to this! I'm in exactly the same situation
+1 to this! I need this very much.
+1 :) I move metadata.db in tmpfs and make symlink to library folder. It's make my library faster.
I got this working by just overlaying the metadata.db file in my database location in docker and it worked fine.
@zanhecht
+1 for this feature.
@jfeeser I feel your pain.
A workaround could be using TrueNas Scale and container. You could keep your books (with metadata) on ZFS on HDD and config folder on ZFS on SSD.
@AleksdemSA / @artbird309 I also tried to mount books as NFS share and then put links to metadata.db stored elsewhere, though not working. Would you mind sharing how you have made it to work?
@konradbjk I am not using a link I am mounting that file directly in docker, below is my volume section of my compose:
volumes:
- $DOCKERDIR/calibre-web:/config
- $MEDIA/Books:/media/Media/Books #whole Books directory from NAS
- $DOCKERDIR/calibre/metadata.db:/media/Media/Books/Calibre/metadata.db #overlay the metadata.db on the library location on the nas but loaded from local file that lets it write it in the calibre container storage
Interesting @artbird309 the only difference I see that you have Calibre subfolder inside your books folder.
Do all your books are inside Calibre subfolder? Could you please share your folder structure?
My folder structure: Physical: NAS SMB mount\Books\calibre #libray location where calibre books are located LazyLibrarian #lazyLibrarian folder where audiobooks are stored and files are downloaded to Local docker store\calibre/metadata.db #DB file to make it writable
Logical how the container sees the files: NAS SMB mount\Books\calibre #libray location where calibre books are located NAS SMB mount\Books\calibre\metadata.db #DB looks like its inside the folder but stored locally
Thanks @artbird309 I tried to avoid this approach (can't work on windows by the way) but it seems to be the only way because SQLlite locking is not possible on NFS
here my compose file if it can helps:
version: "3"
services:
calibre:
image: ghcr.io/linuxserver/calibre-web
container_name: calibre-web
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- DOCKER_MODS=linuxserver/calibre-web:calibre #optional
volumes:
- ./config:/config
- nfs-ebook:/books
- ./config/metadata.db:/books/metadata.db
ports:
- 8083:8083
restart: unless-stopped
Is there any update regarding this issue?
A work around that appears to be working - nfs_or_smb_mount:/config # yes /config not /books - ./config/metadata.db:/config/metadata.db - ./config/app.db:/config/app.db - ./config/gdrive.db:/config/gdrive.db - ./config/server-users.sqlite:/config/server-users.sqlite
I‘ve implemented the feature in the development branch, but it needs testing before I can merge it
@OzzieIsaacs Is that available with any existing docker tags? Happy to test, I'm already on nightly.
Highly Experimental:
This appeared 3 days ago on Calibre-Web's master branch!
- "Implement split library and books" https://github.com/iiab/calibre-web/commit/d68e57c4fc5525b32c2312a251434368d9211251
- "Mark separate library as highly experimental" https://github.com/iiab/calibre-web/commit/d8f5c175187c12d53bf059693c0dc61f4a6070a4
Any testing & configuring experiences so far?
I've been tearing my hear out (see here https://github.com/janeczku/calibre-web/issues/3040)
But have now just pulled the master branch, and made use of the https://github.com/janeczku/calibre-web/issues/3040 and the first sync (only two books in my libary at the minute) worked a breeze.