rsync and hard links

Wayne Davison wayned at samba.org
Wed Sep 29 19:08:35 GMT 2004


On Wed, Sep 29, 2004 at 01:36:14PM +0800, John wrote:
> Is there something in the above options I should add or remove?

I don't see anything wrong that should prevent the hard-linking from
happening.  If you do an "ls -li" on the source files, do they all show
the same inode number?  I'll run some tests, just to make sure that that
the options you cite work for me.

> Rather than transferring a directory and all its contents amounting to 
> some tens of thousands of files, would I be better off making a 
> filesystem in a file:
> dd if=/dev/zero seek=$((20*1024*1024)) count=0 bs=1024 of=20-gig
> mke2fs -F -q 20-gig
> and then transferring that?

The downsides of that are that (1) you don't get any benefit of skipping
files that are already up-to-date (since it will update the entire
20-gig of data every transfer) and (2) the block size will be pretty
large, so there won't be as much matched data (so more data will have to
be resent over the wire).

..wayne..


More information about the rsync mailing list