Make an rsync using script with old and new versions of rsync without using the "old" way (--old-args)?

2022-09-02 Thread c.buhtz--- via rsync

Hello,

this is not a usual support question which could be solved by reading 
documentation. I'm an upstream maintainer highly depending on rsync. I'm 
doing some research to better understand the behavior change [1] about 
argument protection when using spaces in path names. I'm not sure if I 
understand all details correct. And that is why I'm asking here. I would 
like to have a confirmation that I understand the details correct and 
that my "solution" is a good choice or if there are alternatives.


Let's see what I currently "know" and please correct me if I'm wrong.

 1. rsync version 3.2.3 (and older) doing it the "old" way which is 
unusual or unexpected by the users because it is not the way other 
applications usually handle path names in arguments.
 2. rsync version 3.2.4 (and younger) doing it the "new" way which is 
IMHO the recommended and preferd way.

 3. `--old-args` activates the "old" behavior
 4. `--protect-args` activates the "new" behavior
 5. `--old-args` and `--protect-args` are the opposite of each other? 
(See that Issue [6])
 6. `--old-args` exist in 3.2.4 (and younger) as a workaround to keep 
old scripts working
 7. `--protect-args` was introduced much earlier with 3.0.0 [2] to 
activate the "new" way


Am I correct so far?

My goals are
 1. Use the "new" arg protection way introduced with 3.2.4
 2. Scripts/applications using that "new way" should work with old and 
new versions of rsync without checking for the rsync version on the 
current system.


My goals in short: I want one way that will work now, in the feature and 
with all rsync versions.


Based on my current research it seems to me the solution would be to 
modify calls like this


rsync -aiv host:"a simple file.pdf" .

to this with replacing double with single quotes and adding `-s` (short 
for `--protect-args`):


rsync -s -aiv host:'a simple file.pdf' .

I'm using `-s` here because `--protect-args` will be renamed to 
`--secluded-args` in rsync 3.2.6 [3].


Sidenote: I still asked that question here [4] and here [5].

 [1] -- 


 [2] -- 
 [3] -- 
 [4] -- 
 [5] -- 
 [6] -- 

--
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


How to use --rsh with multiple sub-arguments?

2022-10-07 Thread c.buhtz--- via rsync
Hello,

rsync does offer the --rsh argument. I would like to use it that way

rsync --rsh=ssh -o ServerAliveInterval=240 -o LogLevel=Error -o 
IdentityFile=/home/user/.ssh/id_rsa -p 22 --delete --delete-excluded -v -i / 
user@localhost:"/tmp/tmp6x75lz10"

You see there are several sub-arguments that need to be put to "ssh" via the 
"--rsh". How can I be sure that e.g. "-o ServerAliveInterval" is interpreted by 
ssh and not by rsync?

-- 
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


Per file Log output to understand hard-link decision

2023-05-14 Thread c.buhtz--- via rsync
Hello,

I know it is a often discussed topic how rsync decide about using
hardlinks or copy a file. Even if content is unchanged problems are
often file permissions and owner ships. I know that.

Is it possible to configure rsync that way that it logs for each file
its decision about using a hardlink and if not why exactly it doesn't?

The background of my question:
I'm part of maintainer team of "Back In Time" a desktop backup software
using rsync in the back. For years we have users reporting about the
hardlink problem. And we are sure that it isn't their fault but ours.
We can't reproduce the problems for sure but we observe the behavior
also on our own machines sometimes.

It would help our investigation if we could better understand the
hardlink-decision for each file and folder.

Kind
Christian

-- 
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