Jump to content
smikwily

AppData/Data Directory Path Config?

4 posts in this topic Last Reply

Recommended Posts

Hi. Still learning my way around Unraid and the forums, so sorry if this is in the wrong place. TIA.

I haven't started dumping a lot of stuff into Unraid yet, as I'm afraid I'm going to screw something up and lose data/info. I've spun quite a few things up and go them working, but nothing I couldn't live without.

Today I started trying to figure out why my Docker memory usage was up to 82% of my available 15.7GiB.

After trying a few suggestions, I saw reference to the fact that you can just spin down Docker, nuke your docker.img file, then re-add the apps from Apps > Previous Apps. I did that and noticed that all the Dockers were up and running, but I couldn't access them.

Then I noticed that the my user defined network was gone. I found a SI1 video that I used when I was first setting things up and found how to recreate that, which I did. I went into all of my dockers and noticed they were all set to the user defined network, but none of them seemed to be using it. I switched all of their Network Types to something else, then switched them back to the Custom network, then hit Apply. They would stop and start over again, then they would work.

I manually did that for everything and thought that everything was fine. But I noticed that some of the more dockers that I a little more problem with weren't working. And when I got logged in, they acted like they didn't know my users or have any data.

So, I'm OK if I lost some data. Again - I haven't jumped in because I want to know what my limitations are and how to work around them. But, if that data is gone, how can I avoid that in the future? From what I can tell, APPDATA is a configuration in most of the CA options and are usually set by default (but can be changed), but that setting doesn't seem to be readily available in everything.

Example: shaarli - it took me a little while to figure out to make the custom port to get that up and running in Unraid, but now the port is there, but the data is gone. After checking the shaarli docs, it refers to data_dir in their config, which seems to point to "data". Similar with trilium: TRILIUM_DATA_DIR=/data

https://shaarli.readthedocs.io/en/master/Shaarli-configuration/#configuration-file-example > Under resources > "data_dir": "data",

Do I modify that config file to point it where I want it to go or do I make a "path" or other docker level change to point that where I want the data stored, so that data isn't lost if I do similar (or worse) in the past. I want to get over to doing backups and such in the near future, but I'm not there yet :)


tl;dr - Docker using too many resources. Nuked and recreated docker.img. Reinstalled apps from CA, but a few lost data. Trying to figure out how to "redirect" the data config on a few dockers - ex: shaarli, trilium - so that doesn't happen again. Thinking that may have contributed to original docker.img issue?

Share this post


Link to post
29 minutes ago, smikwily said:

Do I modify that config file to point it where I want it to go or do I make a "path" or other docker level change to point that where I want the data stored, so that data isn't lost if I do similar (or worse) in the past. I want to get over to doing backups and such in the near future, but I'm not there yet

You may have to do both.  Set the config file to reference say something like /shaarli-data. and you would add a new path mapping to your template of //shaarli-data mapped to something like /mnt/user/appdata/shaarli-data

 

The real place to start on this is if they list somewhere an example of the docker run command, a docker compose file, or a dockerfile so that you can then easier figure out what path mappings it suggests on docker.

Share this post


Link to post
1 hour ago, Squid said:

You may have to do both.  Set the config file to reference say something like /shaarli-data. and you would add a new path mapping to your template of //shaarli-data mapped to something like /mnt/user/appdata/shaarli-data

 

The real place to start on this is if they list somewhere an example of the docker run command, a docker compose file, or a dockerfile so that you can then easier figure out what path mappings it suggests on docker.

https://hub.docker.com/r/shaarli/shaarli/dockerfile
 

VOLUME /var/www/shaarli/cache
VOLUME /var/www/shaarli/data

EXPOSE 80

I learned about Expose, when I was trying to get  it up and running. Is Volume what I need to work with for data locations?

This is their docker-compose.yml on Github, but I'm using the docker.com docker (if that makes sense and is a thing...)

Share this post


Link to post

Yeah, the VOLUME is what the app explicitly suggests be stored out of the image

 

/var/www/shaarli/cache mapped to /mnt/user/appdata/shaarli-cache

/var/www/shaarli/data mapped to /mnt/user/appdata/shaarli-data

 

And maybe the config files are already set to go to /var/www/shaarli/cache which means that once that mapping is in place it should be more or less good to go.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.