files permission and hidden files are not rsync properly

Matt McCutchen hashproduct+rsync at gmail.com
Thu Jul 19 21:11:01 GMT 2007


On 7/19/07, Wayne Davison <wayned at samba.org> wrote:
> On Thu, Jul 19, 2007 at 10:42:05AM -0400, Abdul Khan wrote:
> > rsync --verbose --progress --stats --recursive
> > /home/vpopmail/ 192.167.1.61::email_backup/
>
> You didn't specify owner or group preservation.  I recommend using -a
> (--archive) so that you get everything preserved and everything copied.

Indeed; I missed that.

> In rsync 3.0.0 (which is not yet released), there is a way to run a
> non-root daemon that can save privileged information:  the --fake-super
> option will store things like ownership info (etc.) into an extended
> attribute.  This will allow a daemon to run as user nobody without
> losing the ability to backup and restore the full details of files.

Could you make it possible (at least as an option) to store the
original permissions in the xattr but then create all files with the
default permissions, or possibly the original permissions modulo a
chmod option?  That way, I could make a snapshot and specify who can
read or write the snapshot independently of the permissions
represented inside the snapshot.  For example, as root, I could back
up my machine and offer all users read-only access to retrieve their
stuff from the backup, even while some directories (e.g., /tmp) of the
backup retain the information that they were originally
world-writable.

Matt


More information about the rsync mailing list