Can rsync update files in place?

Paul Slootman paul+rsync at wurtel.net
Tue Apr 16 02:44:02 EST 2002


I've just subscribed, but a search of the archive doesn't indicate this
has been handled before...

Is there a way to get rsync to not create a new file while transferring
and then rename it, but to instead update the existing file in place,
i.e. simply write those blocks that have been updated and leave the rest
alone?

That would be ideal for what I wanted rsync for, namely updating copies
of Oracle data files. These reside on a volume of a NetApp Filer where
other stuff is also located, and snapshots are made regularly of that
volume. Simply deleting the old files and copying them again means that
the Filer considers each and every block of the old files "old", and
that mens they get preserved in the snapshots, which in turn means that
the snapshots take up WAY too much space (the snapshots are a sort of
"copy-on-write" mechanism: as long as only a few blocks are updated, you
only need a few blocks to maintain a snapshot).

I thought that I could get around this by using rsync, because of the
way it only transfers those blocks that have changed. I now know a bit
more about how it works :-)  In no way does rsync increase disk IO
efficiency, it increases network IO efficiency... That of course is
fine, but unfortunatley not quite suited to the purpose I had in mind.

How difficult would it be to add an option so that it works in the way I
would want?  I understand that it would mean losing the "moved data"
optimization, but for Oracle data files where relatively little is
updated (and probably not moved at all) that wouldn't matter a whole
lot.  (The set of files I'm talking about is 40GB in about 20 files,
with 4 files of 8GB.)


In the meantime I'll probably hack up something that compares two files
and then updates those blocks in the second file that differ... won't
work over a network though :-)


Thanks,
Paul Slootman
-- 




More information about the rsync mailing list