Skip to content

Instantly share code, notes, and snippets.

@vshmoylov
Created July 21, 2022 20:10
Show Gist options
  • Save vshmoylov/a999dc4d60466150ceddbfde78f2b613 to your computer and use it in GitHub Desktop.
Save vshmoylov/a999dc4d60466150ceddbfde78f2b613 to your computer and use it in GitHub Desktop.
Archive into tgz and transfer data from remote server to local machine as a single ssh command
ssh user@example.com "cd ~/whenewer/you/want/to; tar -czf - ." > files-backup.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment