NSA310 & rsync

I have successfully installed Openwrt and then the packages for hdd (like block-mount), packages for usb storage (like kmod-usb-storage) and rsync etc.

All working predictably. It has an internal 3.5 in 2TB hdd and has a seagate 4TB usb on its USB port and both formatted to EXT4. The 2 TB internal disk has 1.6TB of files that wished to keep a copy on USB drive for redundancy. So I issued following sync command:

cd /tmp
nohup  rsync  -avr  /mnt/sda1/  /mnt/sdb1/

I usually follow this rsync with another identical / repeat of the same command to see that it does nothing and quickly finishes as my confirmation that the rsync was successful.

However, in this case, its going and repeating the entire file copy (all 1.6TB) again... and again after it was issued the third time.

Any idea, what is going on?

Much appreciate any thoughts.

Stay safe COVID-19


OK. I am posting the solution myself and its actually a linux/rsync matter more than OpenWRT.

It turns out that when rsync is done between two local folders the default behavior bypasses delta-transfer algorithm and the whole file is sent as-is instead. One could use cp -a as that may well be a tad bit more efficient. However, one way to fix this is to use --no-W parameter. So ideally, I should have used:

cd /tmp
nohup  rsync  -avr --no-W /mnt/sda1/  /mnt/sdb1/

Comments welcome but I am marking this as solution.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.