Closed HaydoZV2 closed 4 years ago
I don't think it does what you think it does.
It just lets you specify the config folder location while starting Calibre, as opposed to setting it in the gui after first start.
Specifically I'm talking about:
CALIBRE_OVERRIDE_DATABASE_PATH - allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder. Useful if your library folder is on a networked drive that does not support file locking.
As my library is on a network drive that doesn't play well with file locking.
Gotcha. I'll look into it.
Try this:
1) map a new local folder in docker run/create with -v /path/to/local/folder/:/db
2) Copy the database file to that folder on host
3) Set environment variable in docker run/create with -e CALIBRE_OVERRIDE_DATABASE_PATH=/db/metadata.db
This seems to work if I let the docker install create a new database and then move it.
If I copy my existing calibre database to the override path it reports a corrupted database (can't implement the file lock) and tries to create a new metadata.db in the networked library location.
However, the previous install has carried across operating systems so this may also be interfering. I may have to recreate the database.
I have not tested moving database across OSes
setting calibre variables (CALIBRE_OVERRIDE_DATABASE_PATH
) as docker env variables did not work for me, seems they are not passed to calibre, manually specifying them with s6-env
in the services file worked.
@hex2a - Hi mate, could you elaborate on this a little? I'm a bit of a noob and backing up my system tonight with a view to trying this out tomorrow. I'm currently using docker on Ubuntu and will be moving my libraries from local storage to GDrive (loads of comics).
From what you're saying it's better to specify the env. override in the services file. I've been reading a bit online and it's not immediately clear.
Is it as easy as nano /etc/environment
and then adding CALIBRE_OVERRIDE_DATABASE_PATH=db/metadata.db
? Or is there a little more to it?
Passing -e CALIBRE_OVERRIDE_DATABASE_PATH=/config/metadata.db
didn't work for me either. For some reason it's not being picked up.
It's also not working for me, does anyone have any ideas?
Someone is going to have to do a pull request to bring in the support: https://github.com/just-containers/s6-overlay/blob/44b39577dceaa7c77108078f07b20537ceae8c4b/builder/overlay-rootfs/etc/s6/init/init-stage1#L45 or https://github.com/linuxserver/docker-calibre/blob/master/root/etc/services.d/calibre/run#L11
Just asking regarding the above - would I be able to modify a local copy of the docker to support this prior to it possibly being pulled into a future master? If so, how could I do this? It's a showstopper for me right now due to mergerfs/gsuite causing Calibre to regenerate an empty metadata.db on the local filesystem after each restart of the container.
Thanks!
Sorry, I'm a little thick, and I just saw hurricane's posts. Yup, calibre is missing the with-contenv
in its service file. I'll go ahead and add it
Is it possible to use the calibre environment variables to have the calibre metadata.db in a folder separate to the book storage.
I've tried adding this as a docker environment option with no success.