Skip to content

Instantly share code, notes, and snippets.

@jimdiroffii
Created August 25, 2024 03:55
Show Gist options
  • Save jimdiroffii/7bb0da9b694a8099df9781be7ddc1932 to your computer and use it in GitHub Desktop.
Save jimdiroffii/7bb0da9b694a8099df9781be7ddc1932 to your computer and use it in GitHub Desktop.
Rsync over SSH - syncronize folders with delete option and perform a dry run
# Dry Run (-n)
rsync -avzn --delete -e ssh user@remote_host:/path/to/remote/folder/ /path/to/local/folder/
# Sync
rsync -avz --delete -e ssh user@remote_host:/path/to/remote/folder/ /path/to/local/folder/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment