Fwd: Re: need help with an rsync patch

Sherin A sherinmon at gmail.com
Tue Aug 13 10:40:04 MDT 2013

On Tuesday 13 August 2013 09:49 PM, Justin T Pryzby wrote:
> On Tue, Aug 13, 2013 at 09:43:06PM +0530, Sherin A wrote:
>> If  linux user  foo , with home /home/foo  , what  ownership we need
>> to give the files under his home folder  , it must be "foo" and not
>> root.
> Why?  The user created the hardlink themselves, and it had root
> ownership, why should the backup/restore lose that information?  Are
> you manually chowning the files after restore?  That's prolly also
> losing timestamp information by doing that.
>> After Rsync it will be as follows,
> rsync -H preserves hardinks, otherwise it doesn't.
>> root at cptest [~]# find /home/dom2inho/ -type f -links  +1 => He have
>> hard link in home
>> /home/dom2inho/shadow
>> root at cptest [~]# find /backup/dom2inho  -type f -links  +1 => There
>> is no  hard link in backp
>> root at cptest [~]#
> You should also do find /etc/ -type f -links +1.
> Justin
I am  doing rsync from  root at  to 
storageuser at  over ssh (no 
role for -H) , so  the  storage files must be under the ownership of  
storageuser  and not the  original owner , so we have to  change the 
ownership of files  too "foo" after the restore , otherwise the user foo 
can't access his files . So changing ownership is  not that problem , if 
we can identify which is the HL file .  Otherwise we have to say , rsync 
only need to use in same server itself  with  different partition 
schemes for each directories   and having kernel 3.6+ or higher ?

PS : if any one interested in making a patch with an additional option 
for rsync for  excluding hardlinks with   -links +1 links , please help 
me , it is easy to  check the file  with an lstat / stat  system call. 
Or  is it possible to get a developer documentation for rsync with the 
detailed info ?

Thanks to every one

Sherin A

More information about the rsync mailing list