Skip to content

Instantly share code, notes, and snippets.

@gka
Created April 22, 2013 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gka/5433916 to your computer and use it in GitHub Desktop.
Save gka/5433916 to your computer and use it in GitHub Desktop.
# This will send the entire www.example.com folder over to the home folder on
# your target server in compressed form over and encrypted connection.
tar czf - www.example.com/ | ssh joebloggs@otherserver.com tar xzf - -C ~/
# If you need to get a directory from a server (you must to have an account on it) do such way:
ssh username@from_server "tar czf - directory_to_get" | tar xzvf - -C path_where_to_put
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment