Sending Large Files Reliably Using `rsync` Without SSH

Eric Semeniuc

Eric Semeniuc

May 27, 2021

Rsync is super powerful! It allows you to:

Prerequisites

  1. Both sides have rsync installed
  2. You can ping the sending machine

Setup

Sender

# make a config file to set up rsync
cat > rsyncd.conf <<EOF
[homedir]
    path = /home/%RSYNC_USER_NAME%
    comment = "my home folder"
    read only = true
    list = yes
EOF

# start rsync server
rsync --daemon --config rsyncd.conf --port 8000

Check that directory is shared with:

rsync rsync://localhost:1837

Output:

me@a:~$ rsync rsync://localhost:1837
homedir           "my home folder"

Receiver

rsync --progress --compress --inplace --checksum rsync://MY_HOST:1837/homedir/file.foo .

Flags: --progress: show to progress of the copy

--compress: use file compression to speed up copying on slow links

--inplace: replace large files in-place (avoids running out of disk space if you have very large files)

--checksum: copies over the blocks that are corrupt/changed, allowing large bandwidth savings at the cost of CPU and I/O for calculating checksums

Conclusion

That’s it, you can send big files really fast :D