How to transfert files in a LAN

encryptionrsync

I am trying to back up the whole filesystem from one Debian development machine to a NAS on my local network. Over Samba, I am able to achieve (somehow) better than gigabit speeds at 130MBps, however over rsync, I am getting a max of 25MBps. When you have around 100GB of data to transfer, this is obviously taking some serious time!

I can only presume it's the encryption that is slowing things down and as it's local network only, I presume I don't really need encryption.

I am just creating a complete copy of what's on the development machine, so it needs to detect changes and remove them off the destination (which is why I am using rsync).

Here is my current command:

rsync -avz -e "ssh -p 903" --progress --exclude= {"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / user@IP:/volume1/Backups/NUC --delete

I think because I am using non-standard ports it's causing issues.

Is there any way to speed up this transfer at all? Ideally, I'd like to create images of the development machine so it can just be restored if needed but not sure this is possible using cron.

I have added tags like

-c arcfour

but this seems to cause problems for some reason.

Is there anything better than rsync for just creating a duplication of one system to another as a backup? Or is rsync the right method, just with lower/without encryption?

Best Answer

Your problem is probably the -z flag. It enables compression. It might sound like a good idea at first. At gigabit connection speed it will take more CPU time to compress than to just transfer the data. Keep in mind that most NAS setups don't have much CPU power, so this is extra expensive here.