Skip to content

Instantly share code, notes, and snippets.

@arami265
Last active December 20, 2025 02:15
Show Gist options
  • Select an option

  • Save arami265/5c9e30b56886a897cb5eaae449f1ecba to your computer and use it in GitHub Desktop.

Select an option

Save arami265/5c9e30b56886a897cb5eaae449f1ecba to your computer and use it in GitHub Desktop.
rsync directory over SSH with exclusions (dry run)
rsync -aAXH --numeric-ids --dry-run --delete \
--info=stats2,progress2 \
--exclude='cache/' \
--exclude='*.log' \
--exclude='.env' \
/path/to/source_dir/ user@debian-host:/path/to/dest_dir/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment