--hard-links performance
Paul Slootman
paul at debian.org
Tue Jun 5 19:27:36 GMT 2007
On Tue 05 Jun 2007, Chuck Wolber wrote:
>
> In our case, we store images as hardlinks and would like an easy way to
> migrate images from one backup server to another. We currently do it with
> a script that does a combination of rsync'ing and cp -al. Our layout is
> similar to:
>
> image_dir
> | -- img1
> | -- img2 (~99% hardlinked to img1)
> | -- img3 (~99% hardlinked to img2)
> .
> .
> .
> ` -- imgN (~99% hardlinked to img(N-1))
For migrating things like that, I use something like the following,
where new::image_dir is the image_dir on the new server:
cd image_dir
last=xxx
for i in img*; do rsync -aH --link-dest=../$last new::image_dir/$i; last=$i; done
(not tested :-)
That's much more efficient. Knowing a bit about the structure always
helps in optimizing.
Paul Slootman
More information about the rsync
mailing list