by zeroimpl · 3y ago · 0 comments
I agree that "rsync --archive" ought to preserve extended attributes, same with creating a tarball. But when copying a file, as opposed to creating a backup/archive, I don't think extended attributes should be included by default.
And yes I've also had to compile custom versions of rsync at one point to get a version which understood extended attributes on Mac, but I think that's mostly standardized now.
EDIT: Also most programs don't even preserve permissions/ACLs on copy, so not sure why they'd preserve attributes by default.
The first time when I have used cp, more than thirty years ago, it was a shock for me to discover that this is the default behavior, because it is not something that I can associate with a command named "copy".
Since that day and until today, I always alias the various copy commands like cp or rsync to include all the necessary options for making perfect copies.
I have never needed to use them with different options, which would make imperfect copies, but there have been countless situations when my usage would have been broken by lossy copies.