|
|
Subscribe / Log in / New account

OpenSSH 9.0 released

OpenSSH 9.0 released

Posted Apr 10, 2022 20:16 UTC (Sun) by j0057 (subscriber, #143939)
In reply to: OpenSSH 9.0 released by cyperpunks
Parent article: OpenSSH 9.0 released

The rsync manpage hurts my brain. It lists multiple examples with the '-av' options. What do they do? Well, '-v' or '--verbose' is easy. Then comes '-a' or '--archive', which is equivalent to, quote, "-rltpgoD (no -H, -A, -X)". That usually makes me want to avoid using rsync.


to post comments

OpenSSH 9.0 released

Posted Apr 10, 2022 21:25 UTC (Sun) by farnz (subscriber, #17727) [Link] (5 responses)

The way -a is documented is an example of how it's really difficult to write documentation that's both clear to newcomers and concise for experts.

When you look further down (I have 3.2.3 from Aug 2020), it says:


       --archive, -a
              This is equivalent to -rlptgoD.  It is a quick way of saying you want recursion and want to preserve almost every‐
              thing (with -H being a notable omission).  The only exception to the above equivalence  is  when  --files-from  is
              specified, in which case -r is not implied.

              Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive.  You must separately
              specify -H.

This is much clearer if you're not used to rsync, but a lot less concise - it tries to explain the effect of -rlptgoD but not -H -A -X. If you're an expert user just re-checking the options, though, you'd see the -rlptgoD bit and mentally expand it to: --archive does all the things you'd expect if you're using rsync as a rcp replacement - it handles directories recursively, it copies symlinks as symlinks, it preserves permissions, mtime, group and owner, and it correctly handles Devices and special files, but it does not attempt to copy Hard links as hard links, ACLs or Xattrs.

OpenSSH 9.0 released

Posted Apr 10, 2022 23:43 UTC (Sun) by NYKevin (subscriber, #129325) [Link]

IMHO, the basic problem with rsync(1) is that it doesn't know whether it wants to be a tutorial or a reference document, and so it ends up doing both things badly. It's not quite as bad as bash(1) (too long) or sudoers(5) (https://xkcd.com/1343/, see title text), but it's still not great.

OpenSSH 9.0 released

Posted Apr 11, 2022 0:24 UTC (Mon) by pabs (subscriber, #43278) [Link] (3 responses)

My go-to for rsync is -aSHAX --delete, otherwise you miss some aspects of most Linux native filesystems. In addition I expect there are still some aspects of other filesystems missing, for eg HFS+ resource forks and NTFS secondary streams.

rsync really needs a --mirror option that would make both sides identical in everything.

OpenSSH 9.0 released

Posted Apr 14, 2022 19:40 UTC (Thu) by nix (subscriber, #2304) [Link] (2 responses)

> rsync really needs a --mirror option that would make both sides identical in everything.

It needs to be able to copy the attributes settable via chattr(1) first, and apparently this will never happen. This is a bit annoying to those of us who use rsync to keep whole machines synced with a master on a bigger system and would like to chattr some parts of the tree :(

OpenSSH 9.0 released

Posted Apr 15, 2022 1:27 UTC (Fri) by pabs (subscriber, #43278) [Link] (1 responses)

What workaround for the missing chattr support are you using?

OpenSSH 9.0 released

Posted Jun 3, 2022 16:44 UTC (Fri) by nix (subscriber, #2304) [Link]

Workaround? Not using chattr :( alas, I want to use the immutable bit heavily, and this also breaks every backup program I've ever seen whenever a file is hardlinked (those that support setting the immutable bit at all): they all restore the first link, set its attributes (including immutability), then assume they can make further hardlinks to it later on. Not without unsetting immutability around the hardlinking, you can't...


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds