Skip to main content
Apidly Cloud
Cookie policy

Analytics and ad cookies stay off unless you accept. Cookie policy

We would like to use Google Analytics and Microsoft Clarity to understand how the public pages are used, including page views and session recordings, and the Reddit Pixel to measure whether our ads on Reddit lead to visits and sign-ups. You choose here whether they are on. Rejecting changes nothing about how the site works.

Moving files

Copy files to and from your server with scp and rsync.

Last updated November 20, 20261 min read
View as Markdown

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 -h

If 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 with rsync.

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.

Create a free account

Was this helpful?

Still stuck? Contact us