Can rsync assume that the destination directory is empty ?

Arnaud Aujon Chevallier arnaud at
Thu Jun 9 09:32:37 UTC 2016


I'm currently using rsync to backup up to 1 TB of small files of 
relatively small files (hundreds of Ko mostly)

My backup strategy is to use a full backup and then backup the diff 
every day using hardlink with the previous backup. This means that each 
time I use rsync, the destination directory is empty.

Using strace, I can see that rsync call a 'lstat' command to try to see 
if the file already exists in my destination directory. Is there an 
option to tell rsync that the destination directory is empty ?

Do you think that avoiding this call can improve rsync performances in 
this specific case ?

I tried reading the source code, but I'm not exactly sure where this 
lstat call happens.

Thanks a lot,

Arnaud Aujon Chevallier

More information about the rsync mailing list