[buug] backup a dir with hard links

John de la Garza john at jjdev.com
Tue Feb 13 18:56:47 PST 2007


On Feb 13, 2007, at 6:35 PM, johan wrote:

>
> On Feb 13, 2007, at 17:26 , John de la Garza wrote:
>
>> I maybe misreading, but I don't understand how this link applies  
>> to me.  I am not having a problem with sym links, but rather hard  
>> links (which, as you probably know can only be files not  
>> directories, like the link you posted talks about)
>>
>> I am I missing something?
>
> Probably. The hard link won't be maintained by rsync, since it  
> won't transfer the inode or the fact that two different files are  
> the same inode.
>
> So, without looking at --preserve-hard-links or using the -H  
> option, it won't happen. Add in that flag, and it *should* relink  
> on the other side.
>
>>
>> I want my copy to have the same hard links as the source.
>
> From rsync's man page on MacOS X 10.4.8, and rsync 2.6.9 on OpenBSD  
> 4.0:
>
>        -H, --hard-links            preserve hard links
>
> I'm sure this answered your question.
>
>

yes, thanks

I guess, I will need to use rsync instead of cp, which is fine.





More information about the buug mailing list