Fwd: Re: need help with an rsync patch
Sherin A
sherinmon at gmail.com
Wed Aug 14 10:37:32 MDT 2013
On Wednesday 14 August 2013 08:29 PM, Justin Pryzby wrote:
> On Wed, Aug 14, 2013 at 04:09:46PM +0530, Sherin A wrote:
>> On Tuesday 13 August 2013 10:24 PM, Justin T Pryzby wrote:
>>>> 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 ?
>>> You could do that with --exclude, but first, think about the
>>> implications of that. Your users could make hardlinks to system
>>> files and those owned by other users files (which they can stat) and
>>> that would cause rsync to avoid backing up those files (by either
>>> name, since link count is shared between all links, of course).
>>>
>>> Justin
>> Any further information related with this ?
> On what? How to implement with --exclude? Or how users could cause
> files to be not backed up, making such an implementation a terrible
> idea?
>
> Justin (off list)
It won't work with --exclude ,
because
1) we are identifying all hardlinks with find command and will be
placed in a test file for a user
2) Then we do the rsync with --exclude-from=somefile.txt
But how we solve this timed raced conditions as follows which happen
in between the above to steps ,
hax at hax.com [~/hax]# for i in {1..5000}; do ln -f /etc/shadow $i; done
Still the only solution to embedded the option to avoid hardlink if
need .
--
--------------------------------------
Regards
Sherin A
http://www.sherin.co.in/
More information about the rsync
mailing list