rsync question

Markus Schönhaber ubuntu-users at list-post.mks-mail.de
Fri Jun 19 16:33:58 UTC 2009


FTR: The issue the OP is seeing is not solved by running rsync as root.
The OP has tried that and got the same error.
As Bill already pointed out, the target file system likely doesn't
support owner/group info, causing rsync to fail when trying to change it.

Karl F. Larsen:

> 	I hate to admit that when I backup my Hardy, I have to use a root or
> sudo prefix to rsync. Also going back it seems to need root as well.
> There are a bunch root files and directories in Hardy.

If you want the files on the target to have the same owner and group as
the source files, rsync must have the permission to change owner and
group of those files[1]. Therefore it needs root permissions. So,
running rsync as root in this case is nothing bad but simply necessary.

OTOH, at least when doing the back-up, one can circumvent the necessity
of running rsync as root by using it's --fake-super option. This causes
rsync not to change the permissions of the target files but storing the
original owner, group and permission info in an extended attribute.
This, of cause, requires a target file system that supports extended
attributes[2]. ext4 on my Jaunty, for example, had to be mounted
explicitly with the user_xattr mount option.

[1] Provided those changes are really necessary, for example when there
are files on the source side not belonging to user running rsync.
[2] Which means that --fake-super is no solution for the OP's problem.

-- 
Regards
  mks




More information about the ubuntu-users mailing list