Closed b0o closed 5 years ago
Btw, I found this discussion regarding the use of --
with python-argparse, which may be helpful.
I also need this for some of my uses since I need to tell it to ignore certain SSL issues.
Have you tried the solution I suggested in issue #18?
@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.
I have a beta version with --rclone-args support that I'll post tomorrow.
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.
--rclone-args
as the last argument in the rclonesync.py call, followed by one or more switches to be passed in the rclone calls. For example: ../rclonesync.py ./testdir/path1/ GDrive:testdir/path2/ --rclone-args --drive-skip-gdocs -v -v --timeout 0m10s
. (rclonesync.py is coded to skip Google doc files without the example switch.) Note that the interaction of the various rclone switches with the rclonesync.py process flow has not be tested. The specified switches are passed on all rclone calls (lsl, copy, copyto, move, moveto, delete, sync, rmdirs), although some switches may not be appropriate for some rclone commands. Initial testing shows problems with the --copy-links
and --links
switches.I'll close this issue after some feedback.
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.
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.