Calibre not able to write on mounted (cifs) volume
-
@odie OK, I understand the situation a bit better now. There are 2 problems:
- Moving the library does not work. The package keeps resetting the library location. I am working on fix this.
- Database cannot be moved. Do you mean calibre's own database here (app.db) or do you mean the library database? If it's the latter, I am working on fixing that above. If it's the former, can you clarify why you want to move this? It's just a very small sqlite database.
-
@girish said in Calibre not able to write on mounted (cifs) volume:
@odie Can you please check with the latest package? The library can now be moved wherever you want (of course, not to a cifs volume).
Hello @girish,
I checked with the new image, and database location is now changed persistently. It remembers the location across restarts and across the upgrade.I have a two questions which I would love to get your advice on (related to the fact that cifs volumes don’t handle the permissions). I really would like to keep the database on my cifs storage, so that the client computers with calibre desktop can still use the database.
-
Where on my linux server would you recommend me setting up a clean database (path)? My Cloudron runs on a single purpose pc (only Cloudron installed). Where could this folder be placed?
-
How can I setup an automatic synchronization between this location and my CIFS storage, ignoring permissions but keeping a two way sync going? It doesn’t have to be real time, but it needs to be automatic.
Thanks!
-
-
@odie said in Calibre not able to write on mounted (cifs) volume:
I really would like to keep the database on my cifs storage, so that the client computers with calibre desktop can still use the database.
Is this because you are on Windows ?
The upstream project does not support having a library in CIFS. I think you will have ask upstream for a workaround and then we can try to see how we can set things up on Cloudron side.
I also don't know how things will work out if you just rsync a calibre library between computers (given that this won't be atomic?). I don't have that much experience with calibre database internals.
-
@girish said in Calibre not able to write on mounted (cifs) volume:
@odie said in Calibre not able to write on mounted (cifs) volume:
I really would like to keep the database on my cifs storage, so that the client computers with calibre desktop can still use the database.
Is this because you are on Windows ?
The upstream project does not support having a library in CIFS. I think you will have ask upstream for a workaround and then we can try to see how we can set things up on Cloudron side.
I also don't know how things will work out if you just rsync a calibre library between computers (given that this won't be atomic?). I don't have that much experience with calibre database internals.
I have a couple of devices running Windows and Mac, that all use the Calibre Desktop (I work from different places, so it's easier that way). They all have a local Calibre Libray, which is then synced to this network share that I also access from the Cloudron Calibre Web app. This strategy enables me to keep all Calibre Libraries in sync - I can make changes on one computer, and these sync to different computers via the cifs share. I was hoping that this strategy would also work on Calibre Web as well. It would be useful to be able to do quick edits (e.g. metadata edits), or the occasional upload also on web.
-
@girish said in Calibre not able to write on mounted (cifs) volume:
@odie how do you sync between the computers? rsync with a cron job?
I probably should have used rsync, but I've always found it easier with point&click.... On my Macs, I use FreeFileSync (https://freefilesync.org/) and on Windows, I use SyncBackFree (https://www.2brightsparks.com/). It is sufficient for me to syn every 4 hours, so I use scheduled syncs.
-
@odie so, just to take a step back. If we ignore all this CIFS stuff ...
On Cloudron the library is at
/app/data/library
by default. This maps to the host path at/home/yellowtent/appsdata/<appid>/data/library
(might want to double check this path). Is that path not enough to sync via ssh? -
@girish said in Calibre not able to write on mounted (cifs) volume:
@odie so, just to take a step back. If we ignore all this CIFS stuff ...
On Cloudron the library is at
/app/data/library
by default. This maps to the host path at/home/yellowtent/appsdata/<appid>/data/library
(might want to double check this path). Is that path not enough to sync via ssh?Thanks. I've been moderately successful with this.
I can sync using rsync and the -rz (and rzv, rzP) flags.
The syntax I use is:
rsync -rz /CIFSshare/ /home/yellowtent/appsdata/<appid>/data/library
This way, I manage to sync from the CIFS mount to the /home/yellowtent/appsdata/<appid>/data/library folder. Calibre-web now runs with a writeable database.
Two minor problems with this:
- using the -r option, everything syncs on every subsequent execution of the command (ie all files are copied from the CIFSshare)
- using the -a option instead of -r, the database would be writeable on first sync. But using the -a option resulted in a locked db on second, third etc. run.
The bigger problem is this:
When I use rsync, changes I make on the Cloudron/calibre-web app are not synced back to the NAS folder. So basically, this leaves me to lose edits made via Calibre-web on Cloudron every time I update the library from one of the clients (since local changes on Cloudron calibre-web are not synced to the CIFS share). Relying on a manual sync after every library update on Calibre-web is next to impossible (I often read on my mobile devices, and I like to edit metadata while reading).So basically, it almost appears safer to keep the library on a read-only CIFSshare...
-