cjnaz / rclonesync-V2

A Bidirectional Cloud Sync Utility using rclone
MIT License
357 stars 39 forks source link

Allow specifying rclone passthrough flags #19

Closed b0o closed 5 years ago

b0o commented 5 years ago

It seems there is no way to specify arbitrary rclone flags - in my case I need --config.

Since rclone has so many flags, it doesn't really make sense to need to hard-code them into rclonesync, but rather to allow for the user to specify flags which should pass through to the underlying rclone call.

A common way I've seen this done by other utilities is a -- flag, which signifies that argument processing should stop and all following arguments should be passed through untouched.

For example: rclonesync -v ~/Dropbox dropbox:/ -- --config /etc/rclone/rclone.conf --copy-links

For now, I will create a wrapper script around rclone which sets these opts and pass it as rclonesync's --rclone flag.

b0o commented 5 years ago

Btw, I found this discussion regarding the use of -- with python-argparse, which may be helpful.

Jwink3101 commented 5 years ago

I also need this for some of my uses since I need to tell it to ignore certain SSL issues.

cjnaz commented 5 years ago

Have you tried the solution I suggested in issue #18?

b0o commented 5 years ago

@cjnaz That might work, but since I don’t keep the config file at a standard location, I need to be able to specify the location of the config file in order to be able to use it to specify flags.

cjnaz commented 5 years ago

I have a beta version with --rclone-args support that I'll post tomorrow.

cjnaz commented 5 years ago

rclonesync V2.6 posted. Added support for --config and --rclone-args switches. --config was made a dedicated rclonesync switch since rclone is called at various times, such as listing the remotes, and in the testrcsync.py script.

Please post/share your results with the --rclone-args switch. My test cases are very limited. I experimented for quite a while with the --links and --copy-links switches, with no workable solutions.

I'll close this issue after some feedback.

cjnaz commented 5 years ago

Most of this issue discussion is with regard to the the --config switch, which should be working based in my testing. Issue #18 covers the --rclone-args switch. I'll close this issue. If there is a problem with either switch please open an new issue.