# Rsync

RSync (opens new window) is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon.

# Installation

# Install rsync on your lab machine

Log into your lab machine and run:

sudo apt install rsync

# Install rsync on your local computer

OS X / MacOS
brew install rsync

Note that the code above requires Brew: Install Homebrew package manager for macOS: brew (opens new window).

Ubuntu
sudo apt install rsync

# Use

Here are a few simple examples to get you started.

# Transfer from your local computer

This is an example of data transfers from your local computer to your lab.

# -- Principal example
rsync -avuz path/to/your/local/directory <username>@<labname>:/mnt/cargo/

# -- Practical example
rsync -avuz path/to/your/local/directory demouser@demolab:/mnt/scratch/

# Transfer from your home machine to a blue machine

This is an example of data transfer from your home machine to a iaas or blue machine inside the same lab.

From your home machine:

# -- Principal example
rsync -avuz /mnt/work/my/folder ubuntu@<machinename>:/home/ubuntu/

# -- Practical example
rsync -avuz path/to/your/local/directory ubuntu@demolab-blue-thea:/home/ubuntu/

# Transfer from your blue machine back to your home machine

This is an example of data transfer from a iaas or blue machine back to your home machine inside the same lab.

From your home machine:

# -- Principal example
rsync -avuz ubuntu@<machinename>:/home/ubuntu/ /mnt/work/my/folder 

# -- Practical example
rsync -avuz ubuntu@demolab-blue-thea:/home/ubuntu/ path/to/your/local/directory

# More information

See the official RSync (opens new window) documentation for further details.

# Troubleshooting

# Could not resolve hostname

This error typically happens if you did not complete the onboarding guides and you need to go back to step 3.5 SSH Configuration - Final steps.

ssh: Could not resolve hostname <labname>: nodename nor servname provided, or not known
Last Updated: 10/28/2024