Remote Sync (rsync)🔗
While scp is a great tool for copying files between systems, rsync is even better. rsync is a utility for efficiently transferring and synchronizing files across computer systems, by checking the timestamp and size of files.
- This makes it much faster than
scpwhen transferring large files or directories. - This also makes it ideal for large transfers that might be interrupted, as
rsynccan resume where it left off.
Rsync comes preinstalled by default on Unix-based systems (Linux, macOS), and can be accessed on Windows using WSL.
Basic Usage🔗
To copy a file from a remote server to your local machine:
To copy a file from your local machine to a remote server:
To copy a directory from your local machine to a remote server:
This document provides a brief overview of rsync, its commonly used arguments, and basic usage examples.
Advanced Usage🔗
Commonly Used Arguments🔗
-a: This is a quick way of saying you want recursion and want to preserve almost everything.-v: Verbose mode.rsyncwill print what it's doing.-z: Compress file data during the transfer.-P: Show progress during transfer and keep partially transferred files which is useful for large files.-e ssh: Use SSH for the data transfer.
Try it yourself🔗
Copy a file from the h4hdata node to your local machine's home directory
For more information on rsync, you can check the manual page with man rsync or visit the rsync website.