Introduction
This article explains how to export data stored on compute volumes—including boot disks, persistent disks, and shared filesystems—from your compute instance to a local or remote machine. Transferring data off an instance is a common requirement for tasks such as backups, data analysis, model training, or long-term storage.
Two commonly used tools for secure file transfer over SSH are scp and rsync. While both tools allow you to copy files between systems, rsync provides additional features such as incremental transfers and compression, making it well-suited for large datasets or repeated sync operations. This guide walks through how to use both tools to move data safely and efficiently.
Prerequisites
- Crusoe Cloud account
- Access to the Crusoe Cloud UI or Crusoe CLI
scpand/orrsyncinstalled on the source system (installed by default on most Linux distributions)Sufficient permissions to read data from the source volume and write data to the destination location
Step-by-Step Instructions
Log in to your compute instance using SSH.
-
Locate the directory containing the data on your:
Boot disk
Attached persistent disk
Mounted shared filesystem
Note the full path to the directory or files you want to transfer. This can be achieved by running
pwd
Export Data Using SCP
scp (secure copy) is a straightforward way to copy files or directories over SSH.
Copy a Single File
scp /path/to/file <user>@local_machine_IP:/path/to/destination/Copy a Directory Recursively
scp -r /path/to/directory <user>@local_machine_IP:/path/to/destination/Use scp when performing one-time transfers or copying a small number of files.
Export Data Using rsync
rsync is recommended for larger datasets or repeated transfers due to its efficiency and resume capabilities.
Basic Directory Transfer
rsync -av /path/to/directory/ <user>@local_machine_IP:/path/to/destination/Transfer with Compression
rsync -avz /path/to/directory/ <user>@local_machine_IP:/path/to/destination/Resume Interrupted Transfers
Re-running the same rsync command will continue transferring only missing or changed files.