Content is from a GitHub issue.
The question is:
When a user does an rsync like this:
rsync -e ssh -lauv --exclude-from='exclude-file.txt' --delete /local/eider-pism zonza:/projects/.
it resets the groupid to the user when rsyncing from their machine to zonza and also can no longer delete file/dirs that have eider-pism group.
The options the user uses are:
It looks like it is the archive mode that is causing problems. Those options are:
So it is likely the -g option there that is creating problems.
I would try the following command instead:
rsync -e ssh -luvrptoD --exclude-from='exclude-file.txt' --delete /local/eider-pism zonza:/projects/.
Many of those options are likely not needed, but it is the -a without the -g. On my tests, that seemed to keep the group ID the same as the destination.