Skip to content

Data Transfer – PERUN Supercomputer

1. Introduction

You can transfer files to and from the PERUN supercomputer using:

  • Terminal-based tools: scp, rsync, sftp
  • Graphical applications: MobaXterm, WinSCP (Windows)

All commands must be executed from your local computer, not from PERUN.


2. Using scp (Secure Copy)

scp allows you to securely copy files between your computer and PERUN.

2.1 Basic Syntax

Example – scp Syntax

scp [options] <source> <destination>

2.2 Transfer from Local → PERUN

Example – Upload a File to PERUN

scp localfile.txt <username>@login.perun.tuke.sk:/home/<username>/

Example – Upload a Folder to PERUN

scp -r myfolder <username>@login.perun.tuke.sk:/home/<username>/project/

2.3 Transfer from PERUN → Local

Example – Download a File from PERUN

scp <username>@login.perun.tuke.sk:/home/<username>/results/output.txt .

Example – Download a Directory from PERUN

scp -r <username>@login.perun.tuke.sk:/home/<username>/results ./local_results

3. Using rsync for Efficient Transfers

rsync is recommended for large or frequently updated data. It transfers only changed parts of files.

3.1 Basic Syntax

Example – rsync Syntax

rsync [options] <source> <destination>

3.2 Transfer from Local → PERUN

Example – Upload a File with Progress

rsync -avh --progress data.csv <username>@login.perun.tuke.sk:/home/<username>/data/

Example – Upload a Directory

rsync -avh myproject/ <username>@login.perun.tuke.sk:/home/<username>/myproject/

3.3 Transfer from PERUN → Local

Example – Download a File

rsync -avh <username>@login.perun.tuke.sk:/home/<username>/results/output.txt .

Example – Download a Folder

rsync -avh --progress <username>@login.perun.tuke.sk:/home/<username>/results ./results

3.4 Useful rsync Options

  • -a – archive mode (preserves permissions and structure)
  • -v – verbose output
  • -h – human-readable formatting
  • --progress – show progress information
  • -z – compression during transfer

4. Using sftp (Secure File Transfer Protocol)

sftp provides an interactive shell for browsing and transferring files securely.

4.1 Start an Interactive Session

Example – Start SFTP

sftp <username>@login.perun.tuke.sk

Example – Open Remote Folder with SFTP

sftp <username>@login.perun.tuke.sk:/home/<username>/data

4.2 Download a File from PERUN

Example – Download a File with SFTP

sftp <username>@login.perun.tuke.sk:/home/<username>/results/output.txt ./local_output.txt

4.3 Batch (Automated) Transfers

Example – Automated SFTP Upload

batchfile:

cd /home/<username>/upload
put file*.txt
Run with:
sftp -b batchfile <username>@login.perun.tuke.sk


5. Using a Non‑Default SSH Key

If your SSH key is stored outside the default ~/.ssh/ directory, specify it manually:

Example – Specify a Custom SSH Key

ssh  -i /path/to/key <username>@login.perun.tuke.sk
scp  -i /path/to/key localfile.txt <username>@login.perun.tuke.sk:/home/<username>/
rsync -avh -e "ssh -i /path/to/key" myfolder/ <username>@login.perun.tuke.sk:/home/<username>/myfolder/
sftp -i /path/to/key <username>@login.perun.tuke.sk

Keep your private key secure at all times.