Skip to content

Instantly share code, notes, and snippets.

@davidalexander
Last active January 29, 2020 10:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davidalexander/6643271 to your computer and use it in GitHub Desktop.
Save davidalexander/6643271 to your computer and use it in GitHub Desktop.
rsync the media directory from live site to local site. Useful when you need imagery which is (correctly) ignored by version control.
rsync \
--verbose \
--progress \
--stats \
--compress \
--rsh=/usr/bin/ssh \
--recursive \
--times \
--perms \
--links \
--owner \
--group \
--human-readable \
--ignore-existing \
--exclude "*.flv/" \
--exclude "*.js/" \
--exclude "*.css/" \
--exclude "*.less/" \
--exclude "css/" \
--exclude "css_secure/" \
--exclude "catalog/category/cache/" \
--exclude "catalog/category/.cache/" \
--exclude "catalog/product/cache/" \
--exclude "import/" \
--exclude "js/" \
"user@123.123.123.123:/var/www/site/media/*" \
/Users/Sites/site/media/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment