Translating user names during transfer.
matt at mattmccutchen.net
Wed Nov 11 12:31:41 MST 2009
[Please start a new thread for a new topic.]
On Wed, 2009-11-11 at 12:38 -0500, Dave Mielke wrote:
> Is there a way to translate file ownership during transfer. For example, can it
> be done such that all files owned by user1 end up being owned by user2, and all
> files owned by user3 end up being owned by user4. The actual problem we're
> trying to solve is that some, but not all, users don't exist on the target
> system so we'd like the ownership for users which do exist to remain but to
> have a default owner (or, even better, set of owners) for the rest.
The --usermap option, which is integrated in the current development
rsync and available in a maintained patch "usermap.diff" for rsync
3.0.*, provides some flexibility in mapping file owners. Unfortunately,
looking at the man page, there doesn't appear to be a way to map all
names that are missing on the receiving side. It's a very natural
extension, so I think it ought to be added, but whether anyone is
interested in actually doing it, we'll see.
Note that there's no such thing as a set of owners on POSIX filesystems.
Maybe you would want an ACL granting multiple people access, but that's
something you would have to do yourself with a "find ... -exec
setfacl ..." command after running rsync.
More information about the rsync