Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am backing up a networked server via SSH. Unfortunately, I can't seem to figure out how to get root access to the networked server with Rsync. I am using the following command to perform the backup:

sudo rsync -av ubuntu@*******:/ /media/backup1/ubuntubackup

Some directories come up as permission denied. Once I log in through Rsync, the backup just starts and there is no way to issue the sudo command. I understand that I can use the Rsync daemon to get around this, but I would like to use SSH without the daemon for the sake of simplicity. Does anyone know a way to accomplish this? Any help would be greatly appreciated.

share|improve this question
    
Is this on Amazon Cloud? –  user8290 Jan 1 '12 at 0:53
add comment

1 Answer

up vote 2 down vote accepted

I believe the issue is you are taking 'sudo' on the local box and not on the remote server. I have not verified this, but a structure like the following should work:

rsync -R -avz -e ssh --rsync-path="echo mypassword | \
    sudo rsync" /media/backup1/ubuntubackup ubuntu@*******:/ /media/backup1/ubuntubackup
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.