On Tue, Apr 10, 2001 at 10:53:19PM +1000, Anthony Rumble wrote:
> On Tue, 10 Apr 2001 [EMAIL PROTECTED] wrote:
> > Try it ... rsync does NOT modify files in place, it creates a temporary
> > file and then renames it if the transfer is successful, so the other link
> > (i.e. the old file) will remain.
>
> I know this, but with --partial... if the transfer gets aborted.. it will
> move the (now truncated) image over the link.. .. Ouch..
No, that's not the case. I just tested it. Rsync ends up doing a
rename(2) during the cleanup with --partial and that unlinks the old one
first, leaving the original hard-linked file untouched. At least that's
how it works on Solaris. I also just tested a rename(2) on Linux and it
does the same thing.
Regarding your idea of --also-using, try to work up a patch and see how
it works. I suppose you'd want to lseek() into the second file to the
point that the first file ends.
- Dave Dykstra