On Mon, Aug 30, 2004 at 08:08:09PM +0200, Achim St?bler
wrote:> rsync -avz -e "ssh -i /home/backup/.ssh/id_dsa" backup@server:/
> /backup/server/
>
> Unfortunately I can't figure out how to tell rsync to execute its
remote
> instance via sudo.
You can do this via the --rsync-path option:
rsync -avz -e "ssh -i /home/backup/.ssh/id_dsa" --rsync-path='sudo
rsync' backup@server:/ /backup/server/
You'll also want to make sure that sudo doesn't prompt for a password,
so you could start with a simpler command right before the rsync:
ssh -i /home/backup/.ssh/id_dsa -l backup server sudo date
..wayne..