Skip to content

Instantly share code, notes, and snippets.

@AlexanderRD
Created October 6, 2014 13:10
Show Gist options
  • Save AlexanderRD/f32aff58266f4fdc51df to your computer and use it in GitHub Desktop.
Save AlexanderRD/f32aff58266f4fdc51df to your computer and use it in GitHub Desktop.
SSH remote folder to local machine with tar compression
ssh username@host.co.za "tar -zcf - /remote/dir/target/folder --exclude='/remote/dir/target/folder'" > /local-machine/directory/file.tar.gz
// Multiple excludes can be appended!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment