DATA TRANSFER WITH RSYNC with SSH
rsync , which stands for ‘remote sync’, is a remote and local file synchronisation tool.
What makes rsync unique is that when it transfers files, it minimises the amount of data copied by only transferring the portions of files that have changed.
While rsync can be used to sync directories on the same system, where it becomes particularly powerful is when it’s used between machines over a network or even the internet.
Extremely straightforward to configure provided you have SSH access to the remote machine, the command to push a directory to a remote machine is simply:
rsync -a username@remote_host:/home/username/remotedir localdirthe command to push a file to a remote machine is simply:
rsync filename firstname.lastname@example.org:/root/Desktop/filenameAdditional options for rsync enable features such as compression,
mirroring (be careful of those deletes!) and resume support.
So, if you ever need to transfer multiple files between machines,
there’s likely no better tool than rsync to do it with!