Could server's support of RSync speed up backup process?

1

I have Synology 210j NAS, which supports rsync. Currently this feature is disabled and I use the following code to backup data there from my Mac:

mkdir /Volumes/BackupTemp
mount -t smbfs //login:pass@192.168.xxx.xxx/backup /Volumes/BackupTemp

rsync -archive -backup --stats -h --exclude='.metadata/' --exclude='.Trash/' --exclude='*.pyc' /Users/me/Dev/ /Volumes/BackupTemp/MacBook/Work/

cp /Users/me/KeePass_db.kdbx  /Volumes/BackupTemp/MacBook/

There is Enable network backup service option on the NAS (which supports rsync). I don't understand - if I enable this option, will it help me somehow to speed up back up process? What is the difference when this option is enabled and when it is not?

LA_

Posted 2014-06-03T07:24:42.063

Reputation: 536

Answers

2

When you use rsync like you showed, all file transfers are going through the file share and the NAS knows nothing about rsync being used. If you enable the rsync protocol, then for example checking for file changes, checksums etc can be run on the NAS and not on the your computer. So instead of reading the file from the NAS and doing checks, only simple "yes, this file has changed" and/or checksums are sent over the wire. So it will be a lot faster, since less data has to be sent over.

You can easily test this by enabling the rsync server option and changing the rsync command line to use rsync protocol and not a file share.

Sami Kuhmonen

Posted 2014-06-03T07:24:42.063

Reputation: 2 052

Thanks, enabling of the option helped a lot to increase rsync speed. – LA_ – 2014-06-03T11:42:40.867

2

Yes, it most likely would.

When using SMB (which is really -t cifs for the last decade), rsync works the same way as with local files. If it sees that a large file differs in modification times, it has to read the entire file over SMB to determine which pieces to update.

On the other hand, if it can talk to another rsync on the other device, it can use an efficient protocol to determine what exactly it should update and send the needed blocks of data.

That said, I'm not sure if the option is needed, if it enables the "bare rsync" mode. Running rsync over SSH would be more secure, and it does not need explicit activation, just a special path:

rsync -avz /Users/me/ 192.168.1.2:/backup/MacBook/

user1686

Posted 2014-06-03T07:24:42.063

Reputation: 283 655