Skip to content

Instantly share code, notes, and snippets.

@DaWe35
Last active January 7, 2025 23:32
Show Gist options
  • Save DaWe35/ede03b82be13569ca7245a0f9d4e9fba to your computer and use it in GitHub Desktop.
Save DaWe35/ede03b82be13569ca7245a0f9d4e9fba to your computer and use it in GitHub Desktop.
SCP and rsync commands

Copy local file to remote server using SSH key

rsync --compress --archive --partial --append-verify --verbose --progress -e "ssh -i ~/SSH_KEY" LOCAL_FILE.zip REMOTE_USER@REMOTE_IP:REMOTE_FILE.zip

scp -i ~/SSH_KEY LOCAL_FILE REMOTE_USER@REMOTE_IP:REMOTE_FILE.zip

@DaWe35
Copy link
Author

DaWe35 commented Jan 7, 2025

Remote to local copy (no ssh key):

rsync --compress --archive --partial --append-verify --verbose --progress REMOTE_USER@REMOTE_IP:REMOTE_FILE.zip LOCAL_FILE.zip

@DaWe35
Copy link
Author

DaWe35 commented Jan 7, 2025

del
rsync --compress --archive --partial --append-verify --verbose --progress [email protected]:/home/dawe/trends/database/wmmd_db_2025-01-07.sql /home/dawe/databases/trends-db/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment