Create a tar archive over ssh
01 Jan 2015Creating an archive of a remote directory over SSH:
ssh <host> "tar czf - /remote/directory/" > output.tgz
Example:
ssh you@hostname "tar czpf - /path/to/directory/" > local-file.tgz
Creating an archive of a remote directory over SSH:
ssh <host> "tar czf - /remote/directory/" > output.tgz
Example:
ssh you@hostname "tar czpf - /path/to/directory/" > local-file.tgz