jlesage / docker-crashplan-pro

Docker container for CrashPlan PRO (aka CrashPlan for Small Business)
MIT License
297 stars 38 forks source link

QNAP Container Station #325

Open wojowojo16 opened 3 years ago

wojowojo16 commented 3 years ago

Forgive me, new to containers.....but I think I have this right.

If I deploy with GUI, I can remove /config "bind mount", add a new mount that mounts /config to /Containers/Crashplan-Pro/Config

Now, if I deploy with docker run it works, UNTIL I restart the container.

when I restart it mounts /config to a file within the container and not the mount point above.

Is this an issue with container station and how it works? Is there a way to get around this?

Thanks!

my config:

docker run -d \ --name=crashplan-pro \ -e USER_ID=1000 \ -e GROUP_ID=1000 \ -e PUID=0 \ -e PGID=0 \ -e TZ=America/Chicago \ -e CRASHPLAN_SRV_MAX_MEM=1024M \ -p 5800:5800 \ -p 5900:5900 \ -v /share/containerapps/_ContainerConfigs/CrashplanPro/config:/config:rw \ -v /share/containerapps/_ContainerConfigs/CrashplanPro/storage:/storage:rw \ -v /share/Multimedia:/mnt/multimedia:rw \ jlesage/crashplan-pro

jlesage commented 3 years ago

So when using the UI, can you create the same mapping as the cli?

madfusker commented 3 years ago

Hello,

Here is my config that has worked great on QNAP TVS-872XT for the last couple years. FYI, the QNAP CS GUI is pretty much worthless... Just use the docker run command below, and if you need to change anything, just kill the container and recreate it. I put my docker config files in a share called /share/Docker so they don't get destroyed if I kill the docker /and or upgrade it. Everything else is ro on the shares unless I need to restore something.

Additionally, I noticed about a year or so ago that I had to start specifying the whole device path rather than /share/blah, otherwise the mappings would not work as they used to. YMMV.

docker run --restart unless-stopped -d \ --name=crashplan-pro \ --restart=always \ -e USER_ID=0 \ -e GROUP_ID=0 \ -p 5800:5800 \ -e TZ=America/Chicago \ -e CRASHPLAN_SRV_MAX_MEM=16384M \ -v /share/Docker/appdata/crashplan-pro:/config:rw \ -v /share/CACHEDEV1_DATA/Docker:/share/Docker:ro \ -v /share/CACHEDEV1_DATA/Logs:/share/Logs:ro \ -v /share/CACHEDEV1_DATA/Public:/share/Public:ro \ -v /share/CACHEDEV3_DATA/Movies:/share/Movies:ro \ -v /share/CACHEDEV3_DATA/Music:/share/Music:ro \ -v /share/CACHEDEV3_DATA/Pictures:/share/Pictures:ro \ jlesage/crashplan-pro

MF

wojowojo16 commented 3 years ago

@madfusker I did create with the docker command above, the problem is when the container was restarted it seemed to mount /config and /storage with the bind mount that is shown when deployed through the GUI, vs the specified mount to the /config file in my share.

I wonder if I put the full path vs the share in if that will work? I can try again and see what happens, I'd 100% rather use the docker run command.

wojowojo16 commented 3 years ago

Still breaks on reboot.

docker run -d \ --name=crashplan-pro \ -e USER_ID=1000 \ -e GROUP_ID=1000 \ -e PUID=0 \ -e PGID=0 \ -e TZ=America/New_York \ -e CRASHPLAN_SRV_MAX_MEM=32768M \ -p 15800:5800 \ -p 15900:5900 \ -v /share/CACHEDEV3_DATA/containerapps/_ContainerConfigs/CrashplanPro/config:/config:rw \ -v /share/CACHEDEV3_DATA/containerapps/_ContainerConfigs/CrashplanPro/storage:/storage:rw \ -v /share/CE_CACHEDEV1_DATA/Multimedia:/mnt/multimedia:rw \ -v /share/CE_CACHEDEV1_DATA/fvfc-qnap:/mnt/fvfc-qnap:rw \ -v /share/CACHEDEV3_DATA/containerapps:/mnt/containerapps:rw \ -v /share/CE_CACHEDEV1_DATA/all_data:/mnt/all_data:rw \ jlesage/crashplan-pro

image

jlesage commented 3 years ago

The host paths for /config and /storage don't look correct from the UI.

Instead of -v /share/CACHEDEV3_DATA/containerapps/_ContainerConfigs/CrashplanPro/config:/config:rw, could you use -v /share/containerapps/_ContainerConfigs/CrashplanPro/config:/config:rw ?

madfusker commented 3 years ago

Your configs are going to some strange location that I have never seen on any QNAP device before, and perhaps it's some temp storage location that gets wiped on reboot?

Simply create a share called "Docker" to store your docker files and then use "-v /share/Docker/appdata/crashplan-pro:/config:rw". Problem solved and your settings will be there when you reboot! :)

wojowojo16 commented 3 years ago

@jlesage if you look at first post I used the -v /share/containerapps/_ContainerConfigs/CrashplanPr...and it works, but it doesn't remain persistent. I reboot and get the drives setup like the picture I posted above. I'm at a loss.

Madfusker - the location is just mounted inside the container.

madfusker commented 3 years ago

Forgive me, new to containers.....

... the location is just mounted inside the container.

Right, which is why it gets destroyed. It's doing exactly what you are telling it to do and writing to a tmp storage location. If you don't know much about containers, follow the advice from others here that do and simply write the data to a persistent drive location. This isn't an issue and can be closed.

wojowojo16 commented 3 years ago

@jlesage @madfusker well Gents sorry to keep bugging you but I figured out what I was doing.

Deploying with Docker Run worked fine and was persistent. After deploying I was going into container station, editing the container to limit the amount of memory / cpu used and setting it to auto-restart. When I hit save and it restarted the container, it remounted /config and /storage inside the container folder, NOT in the folder I had assigned in my docker run command.

Take-away is, deploy container and leave it alone and its fine.....

madfusker commented 3 years ago

Ah, yeah, that makes sense now... We probably need a sticky side note in the instructions specifically for QNAP'ery, that you never want to change settings with the QNAP CS GUI. I have never had anything work right using the GUI and never use it. If I need to make any changes to the container I simply kill it and reissue the whole docker command on the command line. Even to change memory or CPU settings. Just delete the whole docker reissue the docker run command above. Everything stays in place since the docker config/data files are outside the container.

wojowojo16 commented 3 years ago

@madfusker yup that makes sense. I'm an IT guy (heavy in infra/vmware etc), so I was 99% sure I was issuing command properly and was getting pretty pissed off when /config was getting remounted. lol

LeeTaylorX12 commented 3 years ago

Just as a PS to this exchange .. if you aren't used to the command line of docker I would recommend using Portainer to create the environment. So much easier and quicker to find your way through.