25

I'm trying to make a backup of my /home to transfer all data from one computer to another. I wanted to save the backup on the same computer and than transfere it to another one. For safety reasons, I'm trying to learn how does it work on the computer without a lot of data (the new one) to be sure I won't delete something instead of copying it.

I've run in terminal:

sudo rsync -avz /home/maria /home/guest/backup

and I had as the result:

sent 58797801 bytes  received 23050 bytes  4705668.08 bytes/sec
total size is 100202958  speedup is 1.70
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]

I've tried once again, with the same result. I have no idea, which files were not transferred, what makes the whole backup useless for me (I wanted to do it automatically in order not to forget about something and loose it).

On both computers I have the same system (Ubuntu 10.04). Rsync version: 3.0.7-1ubuntu1.

Thanks for any tips

4 Answers 4

28

Well, because you are running rsync in the verbose mode, you should be able to see in its output where the problem lies. Usually it is a permission denied error.

For example, suppose I want to back up the ~/.gvfs folder:

$ sudo rsync -av /home/arrange/.gvfs /tmp
[sudo] password for arrange: 
sending incremental file list
rsync: link_stat "/home/arrange/.gvfs" failed: Permission denied (13)

sent 12 bytes  received 12 bytes  48.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]

So my advice is to list through the rsync -av output and look for similar errors.

4
  • I've run sudo rsync -avz --exclude='/*/.gvfs' /home/maria /home/guest/backup and this time no errors. Thanks a lot.
    – maria
    Mar 16, 2011 at 20:15
  • '/*/.gvfs' didn't work for me, ended up using '.gvfs' Oct 25, 2012 at 21:33
  • 12
    If anyone runs it a list bigger than the terminal buffer you can just add | grep failed to your rsync command to list just the files that produced errors.
    – devius
    Dec 13, 2012 at 15:23
  • 2
    @devius +1 . Just a tip... I suggest to fetch the string "failed:" . The column at the end will allow to collect only rsync messages excluding files/dirs with "failed" in their name/path.
    – bitfox
    May 8, 2019 at 15:15
3

I got this error as well. In my case, rsync threw this error because I passed it a non-existent source directory.

1

If you transfer files to remote storage (like freeNAS, etc) - don't forget to set correct rules. Not only set owner, but include this ownerto read-write list also.

freeNAS example

I'm hooked on this.

1
  • O M G I've had weeks of trouble, thank you for taking the time to post this subtlety!
    – moodboom
    Mar 28, 2021 at 21:17
0

In case you running in verbose mode and you want to see where is the "failed: Permission denied" message in all this output, run for a second time the command with grep:

rsync -avzP --exclude 'folderXX' /folder/ /backup-folder/ | grep failed

Now you can see only the files or folders that you cant backup

You must log in to answer this question.

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