Ah - for this I use sudo rsync
- if you’ve kept your UIDs/GIDs in sync and include the permissions then the rsync will maintain ownership.
… as an example
/usr/bin/sudo /usr/bin/rsync -haviz --delete-delay \
-e "/usr/bin/ssh -i /home/me/.ssh/id_rsa" \
--rsync-path="/usr/bin/sudo /usr/bin/rsync" \
/var/www/myblog/content/ \
me@$target:/var/www/myblog/content/