0
Completed

[Consequence] Set cache / thumbnail folder

Matthew Sanders 9 years ago updated by Tom 9 years ago 19
Tom, Ubooquity saves its thumbnail cache and books / comics database within the directory from which Ubooquity is ran.

On NAS systems and other environments with small OS partitions Ubooquity quickly fills up the entire partition.

Please add the capability to set where to save the thumbnail cache and database. On my system Synology auto-partitions the OS to 2.3GB and it has been filled by Ubooquity generated files. If I could set the cache to a different partition this problem would be solved.
Under review
It's technically feasible, but why don't you run Ubooquity from the directory where you want it to store the caches and database file ?
Tom, could you please precise your meaning?

I have too my media on a NAS (with its own hard drives) and ubooquity on my server (with limited OS space).
The thumbnail are generated (& stored) and my server, reducing the available space for the system.
I would be happy if I could have the option to have the thumbnail generated (& stored) on my NAS instead.
You have a mean in minds?

Cheers
Mat
All the files and folders Ubooquity creates (including the cached thumbnails and the database) are located in the "working directory".
The working directory is simply the directory where you are when you launch Ubooquity.
So, for instance, if Ubooquity.jar is in /apps but you want it to create its files in /another/folder/, simply go ("cd" command) in /another/folder/ and run Ubooquity by giving its full path to the java command.
Something like:

java -jar /apps/Ubooquity.jar
If you use a Windows shortcut, the working directory is a field you can define in the properties of your shortcut.

Last way of specifying the working dir: pass the user.dir parameter to java when running Ubooquity.

java -Duser.dir=<your folder> -jar Ubooquity.jar
Replace "<your folder>" by the absolute path of the location where you want Ubooquity files to be written.

Let me know if you have any question.
Tom, thank you for telling us about Ubooquity using the working directory. I will try to run the jar from my storage volume in a few minutes and report back.
+2
The -Duser.dir option successfully moved the working directory to a new location. Ubooquity is saving its database and cached files in the new directory. Thanks, Tom!
nohup java -Duser.dir='/volume1/Comics/Ubooquity' -jar -Xmx1024m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin > nohup.out 2>&1&

Please add this tip to the FAQ page.
Doesn't work for me (Also a Synology NAS). Ubooquity creates the files in my new directory, but I am unable to access the Server afterwards.
Michael, how are you starting the ubooquity.jar file? Are you making sure to add the -webadmin and -port flags? If so what happens after you start the jar and plug the IP address of your server in to a browser window with the port you specified? If you still can't access the server start it without the "> nohup.out 2>&1&" part and read the output Ubooquity prints to the screen. Does it say something about starting the web server?
Hi !

I had the same issue (on debian stable).
I had to move the file embedding the parameters (If you go to the admin page I guess you lost all your parameters...)

Restart afterwards and you should recover everything.

Cheers
Mat
Thanks for the Suggestions! Will try them out and report back.
So, after trying a few things I discovered the reason. I only accessed Ubooquity via https, obviously ; )
Problem is, after you specify a userdir java needs to know directly where the jks file is otherwise it won't know where to look if you only specified the file (thus java only looking in the main folder, which now changed. Copying over the jks to the new folder won't solve the problem).

However with this now solved I have a new one: Ubooquity doesn't writes a log anymore, which is quite important! Does Ubooquity also somehow need to know where to write the log to, and if so where do I specify this?

////Plus, killing the Ubooquity process and starting it again (not via the Ubooquity Webinterface) causes to loose its DB and writing a new one thus having to scan the whole Comic Collection again. What's up with that?////
On second thought: Scanner wasn't finished at that point...

Sanders:
I start/stop it via the sh script and yes those two flags are added, plus the headless one
Question: Do you know if I can somehow start/stop it via the Synology Webinterface? Used the Package before, but it hasn't gotten an Update so far.

Servantie:
Thanks, lost the settings (could have copied them over but decided to start fresh again), but I have very few setting so I simply reconfigured it.
+1
Tom,

Maybe good to precise the cli commands for specifying settings file location (& logs as well if applicable)

Cheers
Matthieu
huh, apparently Ubooquity crashed and after manually restarting it writes the log file again. Unfortunately not into the new user dir but the application dir...
I reproduced the problem you have with the logs.
Investigating...
I found the problem for the logs. It'll be fixed in the next release (and I'll update the FAQ then).
In the meantime your logs will still be written in the folder from which you launch Ubooquity (which is, as explained earlier, not necessarily the one containing Ubooquity.jar).

To sum up: notwithstanding the log location bug I just mentionned, Ubooquity "lives" in only one directory where it writes everything (logs, database, settings, cached files, theme folder...). This directory is the working directory. By default this is the one where you are when you launch Java. You can override it with the "user.dir" setting.
That was quick and alright. Again, thanks Tom.