temporary file

Tim Conway conway at us.ibm.com
Mon Apr 19 15:07:57 GMT 2004


If you mean with the --whole-file, then in part, it may waste bandwidth, 
as any change in the files metadata will trigger a whole new send.  Like I 
said, it depends on the nature of your data.  For instance, the file you 
mention as an example - a .tar.gz file, will probably not have any 
re-useable blocks of data, and will always be resent in toto if sent at 
all, no no matter the flags.
--whole file's main optimization is to avoid reading the whole file 
repeatedly over the network filesystem.
The ratio of file adds to file modifications, and the ratio in speed 
between your link from source to destination versus the speed of the 
filesystem, and the processor power available on both ends, determine 
whether --whole-file is good or bad.  Someone smarter than me could 
probably model it for you, but the best advice for most of us is to take a 
typical run and do it both ways, and pick the best performer between the 
two.

Also, there will always be some copying if you work from an existing file. 
 Rsync does not, under any circumstance, modify a file in place.  It works 
from the original and the delta to create the new file, and the old file 
doesn't go away until its replacement is ready to take over.

Tim Conway
Unix System Administration
Contractor - IBM Global Services
desk:3032734776
conway at us.ibm.com




MEGA Hospedagem <rsync at megahospedagem.com.br> 
04/19/2004 09:12 AM

To
Tim Conway/Denver/Contr/IBM at IBMUS
cc

Subject
Re[2]: temporary file






I guess there's waste of BW because rsync will be used in this case
like "cp"
It's not just sending differences, and it will send even files that
are equal to the ones that already exists.

Am I wrong?

-- Luis Fernando

TC> no.
TC> it creates the temporary file, then deletes the old file and renames 
the 
TC> temp file to the correct filename.  Unless samba won't let you rename 
a 
TC> file, (I know windows moves within a filesystem are copy/deletes, at 
least 
TC> with cygwin on windows 2000), there's no actual waste there.  I'd 
expect 
TC> rsync to work pretty well with samba, considering its ancestry.

TC> If the samba share is a bottleneck, I'd bet you'd get a big boost by 
using 
TC> the --whole-file option... it kind of depends on the nature of your 
data, 
TC> the filesystem, and the link between the systems.

TC> Tim Conway
TC> Unix System Administration
TC> Contractor - IBM Global Services
TC> desk:3032734776
TC> conway at us.ibm.com


TC> I did the following command:
TC> rsync -a --delete cpbackup /mnt/backup/

TC> It works well, but the problem is that it seens the "temporary files"
TC> (ie: -rwxr-xr-x 1 root root 83623936 Apr 19 2004
TC> .name.tar.gz.yGk7m7* ) are being created on /mnt/backup/

TC> Since it's a SAMBA mounted partition, it waste BW and is slower.
TC> Is there a way to specify where I want the temp files to be created?





More information about the rsync mailing list