Thursday, January 30, 2014

Compress and transfer in one step

This command uses tar to compress a directory and store it into a file located on a remote system. Handy.
$ tar vzcf - /path/to/data | ssh user@remotesvr `cat - > /backups/data.tgz`

No comments: