Rsync Runs Out of Space Because of Temp File

Paul Slootman paul+rsync at wurtel.net
Wed Apr 8 16:51:30 GMT 2009


On Wed 08 Apr 2009, philvh wrote:
> 
> I have 2 mounted drive.  Each have 60 GB.  On each drive, there is a 50 GB
> file (it's a virtual machine) and nothing else.
> 
> When I sync one with another, there should not be a problem, because there
> are 10 GB left, and also, shouldn't it re-use the space of the destination
> file?
> 
> I found that it creates a 10 GB temporary file on the destination folder. 
> It looks like it doesn't write to the destination file, but rather creating
> a temporary file first (like a diff or something).  I really don't know the
> inner working of it.  However, I would assume it just updating the
> destination, and there should be plenty of space for that.

By default rsync makes an updated copy of the file, possibly using data
from the existing version to speed up the transfer (actually, to
minimize network traffic). The data it needs may be at a position
further towards the end of the file than it currently resides (e.g. the
beginning of the file was deleted, leaving the last part). If it simply
overwrites the existing file, that optimization would then not be
possible.

You can force the updating in-place of the file by using the --inplace
option...  It's all there in the manpage.


Paul Slootman


More information about the rsync mailing list