rsync backup permissions - Tools
This is a discussion on rsync backup permissions - Tools ; I had a quick look for an answer to what I'd presume is a common Q but
failed so wondering if somebody here would point me in the right
direction, please & thanks?!
I wish to use rsync to backup ...
-
rsync backup permissions
I had a quick look for an answer to what I'd presume is a common Q but
failed so wondering if somebody here would point me in the right
direction, please & thanks?!
I wish to use rsync to backup users' home dirs from machineA (Debian) to
machineB (Fedora). I have a script, say backup.sh, in my own home dir
and linked to from /etc/cron.daily and have set up the ssh keys so
root@machineA can rsync to localUser@machineB. In testing the script is
run and files are transferred. However, they are owned by localUser (of
machineB) not of each user on machineA.
I have tried various rsync options (--perms) but without joy. Can
somebody advise me which flags I require?
Thanks, Michael
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-
Re: rsync backup permissions
On Thu, 2008-10-09 at 14:17 +0100, michael wrote:
> I had a quick look for an answer to what I'd presume is a common Q but
> failed so wondering if somebody here would point me in the right
> direction, please & thanks?!
>
> I wish to use rsync to backup users' home dirs from machineA (Debian) to
> machineB (Fedora). I have a script, say backup.sh, in my own home dir
> and linked to from /etc/cron.daily and have set up the ssh keys so
> root@machineA can rsync to localUser@machineB. In testing the script is
> run and files are transferred. However, they are owned by localUser (of
> machineB) not of each user on machineA.
>
> I have tried various rsync options (--perms) but without joy. Can
> somebody advise me which flags I require?
>
> Thanks, Michael
>
I should add that I've also tried these flags:
rsync --super -o -g --perms -z --partial -v --recursive --stats
--times --links --exclude-from=${LOCAL_DIR}/.rsync-EXCLUDE
--timeout=1800 ${LOCAL_DIR} ${REMOTE_LOGIN}:${REMOTE_DIR}
but get errors such as
rsync: chown // failed: Operation not
permitted (1)
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-
Re: rsync backup permissions
On Thu, 2008-10-09 at 14:38 +0100, michael wrote:
> On Thu, 2008-10-09 at 14:17 +0100, michael wrote:
> > I wish to use rsync to backup users' home dirs from machineA (Debian) to
> > machineB (Fedora). I have a script, say backup.sh, in my own home dir
> > and linked to from /etc/cron.daily and have set up the ssh keys so
> > root@machineA can rsync to localUser@machineB. In testing the script is
> > run and files are transferred. However, they are owned by localUser (of
> > machineB) not of each user on machineA.
> I should add that I've also tried these flags:
>
> rsync --super -o -g --perms -z --partial -v --recursive --stats
> --times --links --exclude-from=${LOCAL_DIR}/.rsync-EXCLUDE
> --timeout=1800 ${LOCAL_DIR} ${REMOTE_LOGIN}:${REMOTE_DIR}
>
> but get errors such as
> rsync: chown // failed: Operation not
> permitted (1)
-o is the option you want, but the receiving rsync needs to run as root
to be able to set the file ownership. Alternatively, you could use
--fake-super, which does not set the real ownership but saves the
ownership data in an extended attribute from which a later rsync run can
retrieve it.
Matt
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-
Re: Re: rsync backup permissions
So would the receiving end need to be running in daemon mode? There
would be no way to set the proper ownership if it isn't?
Matt McCutchen wrote:
> On Thu, 2008-10-09 at 14:38 +0100, michael wrote:
>> On Thu, 2008-10-09 at 14:17 +0100, michael wrote:
>>> I wish to use rsync to backup users' home dirs from machineA (Debian) to
>>> machineB (Fedora). I have a script, say backup.sh, in my own home dir
>>> and linked to from /etc/cron.daily and have set up the ssh keys so
>>> root@machineA can rsync to localUser@machineB. In testing the script is
>>> run and files are transferred. However, they are owned by localUser (of
>>> machineB) not of each user on machineA.
>
>> I should add that I've also tried these flags:
>>
>> rsync --super -o -g --perms -z --partial -v --recursive --stats
>> --times --links --exclude-from=${LOCAL_DIR}/.rsync-EXCLUDE
>> --timeout=1800 ${LOCAL_DIR} ${REMOTE_LOGIN}:${REMOTE_DIR}
>>
>> but get errors such as
>> rsync: chown // failed: Operation not
>> permitted (1)
>
> -o is the option you want, but the receiving rsync needs to run as root
> to be able to set the file ownership. Alternatively, you could use
> --fake-super, which does not set the real ownership but saves the
> ownership data in an extended attribute from which a later rsync run can
> retrieve it.
>
> Matt
>
>
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-
Re: rsync backup permissions
On Fri, 2008-10-10 at 18:43 -0400, Matthew Monaco wrote:
> So would the receiving end need to be running in daemon mode? There
> would be no way to set the proper ownership if it isn't?
Not necessarily. The receiving end just needs to run as root, and that
can be accomplished on a run over remote shell by logging into the
remote root account directly or using "sudo" or similar.
Matt
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html