John Lane
2016-Aug-01 14:14 UTC
rsync send "non-rsync" options to the server side (--remote-option) and (--protect-args)
I have been working on a backup server where I have a server-side script that wraps the server-side rsync invocation. I have used the client-side rsync -M (--remote-option) to send options to the server script, removing them from the command-line prior to invoking the server-side rsync. This was discussed on Stack Exchange (http://unix.stackexchange.com/questions/297143). It works well. However, one observation is that the rsync client's -s (--protect-args) option passes all arguments directly into the rsync server and only sends a minimal rsync command-line to launch the server-side rsync. This means my script does not see -M options when -s is used. It also means that the server-side rsync receives options not intended for it and these cause it to terminate. I note from the man-page that the -s option "will eventually become a new default setting at some as-yet-undetermined point in the future". When that happens, it will break what I have above. So, a couple of questions: * is using -M the right way to send non-rsync options to the server side ? * could it be considered for -s to not affect non-rsync options that have been specified with -M ? Thanks for your attention.
John Lane
2016-Oct-28 14:32 UTC
rsync send "non-rsync" options to the server side (--remote-option) and (--protect-args)
Hello, I asked the below back at the beginning of August but have received no replies. If anyone can help me with this problem it would be much appreciated. If I have not provided some necessary information then please let me know so I may do so. Thanks in advance.> I have been working on a backup server where I have a server-side script > that wraps the server-side rsync invocation. I have used the client-side > rsync -M (--remote-option) to send options to the server script, > removing them from the command-line prior to invoking the server-side > rsync. This was discussed on Stack Exchange > (http://unix.stackexchange.com/questions/297143). It works well. > > However, one observation is that the rsync client's -s (--protect-args) > option passes all arguments directly into the rsync server and only > sends a minimal rsync command-line to launch the server-side rsync. > > This means my script does not see -M options when -s is used. It also > means that the server-side rsync receives options not intended for it > and these cause it to terminate. > > I note from the man-page that the -s option "will eventually become a > new default setting at some as-yet-undetermined point in the future". > When that happens, it will break what I have above. > > So, a couple of questions: > > * is using -M the right way to send non-rsync options to the server side ? > > * could it be considered for -s to not affect non-rsync options that > have been specified with -M ? > > Thanks for your attention. >
Wayne Davison
2016-Oct-29 02:14 UTC
rsync send "non-rsync" options to the server side (--remote-option) and (--protect-args)
If you want to pass non-rsync args (etc) you should be using --rsync-path. The -M option is only for sending rsync-related options. ..wayne.. On Fri, Oct 28, 2016 at 7:32 AM, John Lane <rsync at jelmail.com> wrote:> > Hello, I asked the below back at the beginning of August but have > received no replies. If anyone can help me with this problem it would be > much appreciated. If I have not provided some necessary information then > please let me know so I may do so. Thanks in advance. > > > I have been working on a backup server where I have a server-side script > > that wraps the server-side rsync invocation. I have used the client-side > > rsync -M (--remote-option) to send options to the server script, > > removing them from the command-line prior to invoking the server-side > > rsync. This was discussed on Stack Exchange > > (http://unix.stackexchange.com/questions/297143). It works well. > > > > However, one observation is that the rsync client's -s (--protect-args) > > option passes all arguments directly into the rsync server and only > > sends a minimal rsync command-line to launch the server-side rsync. > > > > This means my script does not see -M options when -s is used. It also > > means that the server-side rsync receives options not intended for it > > and these cause it to terminate. > > > > I note from the man-page that the -s option "will eventually become a > > new default setting at some as-yet-undetermined point in the future". > > When that happens, it will break what I have above. > > > > So, a couple of questions: > > > > * is using -M the right way to send non-rsync options to the server side > ? > > > > * could it be considered for -s to not affect non-rsync options that > > have been specified with -M ? > > > > Thanks for your attention. > > > > > -- > Please use reply-all for most replies to avoid omitting the mailing list. > To unsubscribe or change options: https://lists.samba.org/ > mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20161028/794360be/attachment.html>
Possibly Parallel Threads
- rsync send "non-rsync" options to the server side (--remote-option) and (--protect-args)
- rsync send "non-rsync" options to the server side (--remote-option) and (--protect-args)
- Matching rows in a Data set? I'm Stuck!!
- transform.data.frame() ignores unnamed arguments when no named argument is provided
- How to arrange the data