[PLUG] Copying files with rsync

Jason Van Cleve jason at vancleve.com
Mon May 27 07:30:37 UTC 2002


On Sun, 26 May 2002 23:50:55 -0700 (PDT)
Matt Alexander <m at netpro.to> wrote:

> Question 1:  If a data file is only slightly changed, does rsync only
> copy over that small change and then insert it properly into the data
> file on the backup server?

I think only the different parts of the file are transferred.  There is
a page on the site describing the algorithm
(http://rsync.samba.org/tech_report/node2.html), which states:

"The end result is that $\beta$ gets a copy of A, but only the pieces of
A that are not found in B (plus a small amount of data for checksums and
block indexes) are sent over the link."

Whether a copy is made at the destination I can't say, but maybe you can
divine that from the algorithm I linked.  There is an
option "W", as well, by which you can bypass that algorithm and copy
"whole files".  This is actually the default when rsync is copying
locally.

> Question 2:  If the data file is being written to when I run rsync, do
> I run the risk of ending up with a corrupted data file on the backup
> server?

I'm not sure about this one, but I would sure like to be!  I hope with
crossed fingers that it waits to copy any file that is write-locked, at
least.

--Jason V. C.




More information about the PLUG mailing list