Use scp for a few files and rsync for folders or repeated copies. Both use SSH, so you need a server with an SSH key. See Connect with SSH.
Replace PORT and HOST with the values on the server's Connect tab. The user is root.
Copy to the server
scp -P PORT ./file.txt root@HOST:/workspace/
scp -P PORT -r ./data root@HOST:/workspace/scp uses a capital -P for the port.
Copy from the server
scp -P PORT root@HOST:/workspace/results.tar.gz ./Sync a folder with rsync
rsync -avz -e "ssh -p PORT" ./data/ root@HOST:/workspace/data/
rsync -avz -e "ssh -p PORT" root@HOST:/workspace/checkpoints/ ./checkpoints/If it stops, run the same command again. rsync continues where it left off. The trailing / on a folder matters: ./data/ copies the contents.
On Windows
PowerShell includes scp. Rsync is not included. Use scp, or use rsync inside Windows Subsystem for Linux.
Check the disk first
df -hIf the disk is full, delete files you do not need. The disk size is set when you deploy.
Common problems
- Permission denied: use the key that matches one of the keys on the server. Add
-i ~/.ssh/your_key. - Connection refused or timeout: the server must be running. Copy the host and port again, because they can change after a restart.
- A copy is slow: compress first with
tar -czf, or copy only what changed withrsync.
Copy important results off the server before you destroy it. See Storage and data.
Ready to try it?
Create a free account and add credit when you want to start a server. The smallest top-up is $10.
Was this helpful?