Open sea3pea0 opened 5 years ago
I was also interested and managed to implement like https://github.com/wiserain/docker-cloud-media-scripts/commit/dbca41deaa5de861e4cc09c8228977f829025a04 I checked working in my system, but not sure for general use. Just for your reference.
It would be nice if we could place a file like ".nocloud" in a folder on the local-media mount to prevent that folder from being uploaded to the cloud. This is what I did with my upload scripts before moving my install to docker. Maybe this is already possible and I overlooked it.. Thanks, working great so far though I haven't tried the upload and deletion scripts yet..
Edit: Just realized that since you can pass arguments with the upload script to rclone, you can use the argument --exclude-if-present="" to accomplish what I wanted
Update: For some reason the arguments aren't being passed to rclone. Here is what I have in my crontab:
20 8 * * * docker exec plexdrive rmlocal -v --bwlimit 25M --exclude-if-present=".no_cloud" 20 4 * * * docker exec plexdrive cloudupload -v --bwlimit 25M --exclude-if-present=".no_cloud"
This is an excerpt from ps aux ran inside the container:root 724 0.0 0.0 18048 2832 ? Ss 04:24 0:00 /bin/bash /usr/bin/rmlocal -v --bwlimit 25M --exclude-if-present=.no_cloud root 761 0.0 0.0 18208 2976 ? S 04:24 0:00 /bin/bash /usr/bin/rmlocal.script -v --bwlimit 25M --exclude-if-present=.no_cloud root 762 0.0 0.0 4380 700 ? S 04:24 0:00 tee /log/rmlocal.log root 811 0.0 0.0 23136 4208 ? S 04:24 0:00 sort -n root 812 0.0 0.0 4384 660 ? S 04:24 0:00 cut -d: -f2- root 813 0.0 0.0 7588 888 ? S 04:24 0:00 awk {$1=$2=$3=""; print $0} root 814 0.0 0.0 18212 2492 ? S 04:24 0:00 /bin/bash /usr/bin/rmlocal.script -v --bwlimit 25M --exclude-if-present=.no_cloud root 991 0.0 0.0 18252 3304 pts/1 Ss 04:24 0:00 /bin/bash root 1070 12.9 1.7 570140 560096 ? Sl 04:25 0:16 rclone move --config=/config/rclone.conf --buffer-size 500M --checkers 16 /local-decrypt/music/somedir/somefile root 1084 0.0 0.0 34424 2888 pts/1 R+ 04:27 0:00 ps aux
The arguments get passed to the script inside the container but not to rclone. Please let me know what I'm doing wrong or if its not just me. Thanks!Update 2: After further testing, arguments are passed by the cloudupload script but not by the rmlocal script. Also I have found that using the --exclude-if-present or --exclude parameters with rclone won't work on parent directories of the files the scripts are trying to move or copy because since the paths the scripts copy or move are specific they negate what I'm trying to exclude from being moved or copied. So it would be nice if we could tell the script directories we would like excluded. For the time being, since I don't want my music being copied I can use --exclude=".flac" --exclude=".mp3". But not until I can get these parameters to pass to rclone from the rmlocal script