Try this:
sudo rsync -e "sudo -u localuser ssh" -a myserver:/var/sites/example.net/ /var/sites/example.net/
This runs rsync
as root, but the -e
flag causes rsync
to run ssh
as your local user (using sudo -u localuser
), so the ssh
command has access to the necessary credentials. Rsync itself is still running as root, so it has the necessary filesystem permissions.