Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Data Transfer

You may need to move data to/from HPC; use the right tool for the size and type of transfer.

Rule of thumb


scp (Secure Copy)

Use scp to copy files over SSH. Good for small-to-moderate transfers.

Copy a local file to RCC (Midway3 example)

scp path/to/local_file.txt <CNetID>@midway3.rcc.uchicago.edu:/home/<CNetID>/

Copy a directory recursively to RCC

scp -r path/to/local_folder <CNetID>@midway3.rcc.uchicago.edu:/scratch/midways3/<CNetID>/

Copy a file from RCC to your laptop

scp <CNetID>@midway3.rcc.uchicago.edu:/scratch/midways3/<CNetID>/results.csv .

sftp (Secure File Transfer Protocol)

sftp is like an interactive file browser over SSH.

Start an sftp session

sftp <CNetID>@midway3.rcc.uchicago.edu

Useful commands inside sftp:

ls            # list remote files
lls           # list local files
cd DIR        # change remote directory
lcd DIR       # change local directory
get FILE      # download from remote
put FILE      # upload to remote
get -r DIR    # download directory
put -r DIR    # upload directory
bye           # exit

Examples:

Download a directory from remote to local:

sftp> cd /project/myproject
sftp> lcd ~/Downloads
sftp> get -r results
# Downloads the 'results' directory to ~/Downloads/results

Upload a directory from local to remote:

sftp> cd /project/myproject
sftp> lcd ~/Documents/mycode
sftp> put -r src
# Uploads the 'src' directory to /project/myproject/src

Tip: GUI clients like FileZilla also speak SFTP if you prefer point-and-click.


rsync (fast syncing over SSH)

rsync is usually the best choice when:

Sync local → RCC

rsync -avz --progress -e ssh local_folder/ <CNetID>@midway3.rcc.uchicago.edu:/scratch/midways3/<CNetID>/project_folder/

Sync RCC → local

rsync -avz --progress -e ssh <CNetID>@midway3.rcc.uchicago.edu:/scratch/midways3/<CNetID>/project_folder/ local_folder/

Common options:

References:


Globus is the best choice for:

RCC Globus docs:

How it works (conceptually):


Common mistakes (and how to avoid them)


Optional: simplify commands with SSH config

You can define short host aliases in ~/.ssh/config to avoid typing long hostnames.

Example ~/.ssh/config:

# RCC
Host midway3
    HostName midway3.rcc.uchicago.edu
    User YOUR_CNETID

# DSI
Host fe.ds*
  HostName fe01.ds.uchicago.edu
  IdentityFile PATH_TO_PRIVATE_KEY
  ForwardAgent yes
  User YOUR_CNETID

Host *.ds !fe.ds
  HostName %h.uchicago.edu
  IdentityFile PATH_TO_PRIVATE_KEY
  ForwardAgent yes
  User YOUR_CNETID
  ProxyJump fe.ds

After this, you can shorten commands:

# Instead of <CNetID>@midway3.rcc.uchicago.edu
ssh midway3

rsync -av data/ midway3:/scratch/midways3/$USER/data/

scp results.csv dsi:/scratch/$USER/

sshfs (Local File SystemMount)

sshfs lets you mount a directory on an RCC system as a local folder on your computer using SSH. This allows you to browse, copy, and edit files without repeatedly running scp or rsync.

When to Use sshfs

Not recommended for large data transfers or performance‑intensive I/O.

Requirements (Windows and Linux only)

Basic Usage

Create a local mount point

mkdir ~/rcc_home

Mount your RCC home directory

sshfs <CNetID>@midway3.rcc.uchicago.edu:/home/<CNetID> ~/rcc_home

Authenticate with your password and Duo when prompted.

Unmount when finished

Performance and Best Practices

Summary

sshfs is a convenient tool for lightweight, interactive access to RCC files. Use it for convenience, not throughput.