1

I'm using Rsync to backup an Ubuntu Server server. I'm getting a lot of permission denied messages. Is there a command I can use to see exactly what directories were denied? I could scroll back up through all the files, but that would take forever. Any help would be greatly appreciated.

2 Answers 2

2

Run the rsync again, but drop the -v (so that you only see errors, rather than a complete work log) and add -n (which 'emulates' the rsync, saving you the time of actually transferring the files.)

You could also leave the -v, but use shell redirection to send errors to a different log. The following should work:

rsync -alv -e "ssh -l root" foo:/ /backups/foo/ > r.log 2> r-error.log 

cheers!

0
1

You could use grep to search through the warnings / errors - but you'd probably need to run the rsync again to be able to save the output to do this. (Or save your screen buffer to a file so that you can grep through it.)

What are you backing up? The entire server? If so, just make sure you're doing it as root, otherwise this will be an expected issue - as there will be at least several files that aren't readable to anyone other than root.

Additional details at https://help.ubuntu.com/community/rsync#Rsync_Daemon, including:

The rsync daemon is an alternative to SSH for remote backups. Although more difficult to configure, it does provide some benefits. For example, using SSH to make a remote backup of an entire system requires that the SSH daemon allow root login, which is considered a security risk. Using the rsync daemon allows for root login via SSH to be disabled.

2
  • The command I used was, sudo rsync -av *******:/ /media/backup1/ubuntubackup. I am backing up an Ubuntu server. I'm guessing not logging in as root is the problem. However, I don't know how to login as root, as I can't issue the sudo command once logged in through Rsync. The backup just starts. I apologize if this is a noob question, but do you have any advice on how to access the Ubuntu server as root through Rsync? If not, I'll post that question by itself.
    – Arthur
    Dec 31, 2011 at 19:03
  • 1
    @Arthur - see help.ubuntu.com/community/rsync#Rsync_Daemon.
    – ziesemer
    Dec 31, 2011 at 19:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .