Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Nov 2011 08:05:33 -0600
From:      Martin McCormick <>
To:        "" <>
Subject:   Re: Rsync and Preservation of Ownership and Permissions 
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
Michael Sierchio writes:
> Does the same user exist on the remote system, with the same uid, etc.?


> If you're using rsync with ssh as the transport, and connecting to the
> remote machine as the backups user, that's who will own the files on
> its local filesystem...

I thought rsync had some encoding it might slip in to the tree
that another rsync run as root on the recovering system could
use to figure out all those thousands of ownerships and get them
all straight, but this makes perfect sense.
> You've written a lot of narrative, but show us precisely what commands
> you're running.  Why would you run the command as root, and ssh as
> backups, when you want them to be owned by "normal" ?

	Because root is the only user who can "see" files from
all other users so root starts the process. Here is what I
tried. Remember, folks, this will not work! This tries to backup
a system named z.

#rsync --delete -alHvq --exclude "/proc" //

> You can run the command as root, and use restricted ssh keys (use
> authorized_keys to restrict it to executing a specific rsync
> command)....  you can run rsync as a regular user to that user's
> account on the remote system... writes:
> Perhaps you could have rsync log in to a jail on the backup server,
> where it could safely be granted root permission.

Hmm. It's all rather clear, now. A jailed environment that looks
like root is about the only thing that could work.

	Thank you.

Want to link to this message? Use this URL: <>