[buug] backup a dir with hard links

johan jb at caustic.org
Tue Feb 13 18:35:02 PST 2007


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.





More information about the buug mailing list