DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Ssh Remote Backups

02.01.2006
| 11386 views |
  • submit to reddit
        // http://www.linux.com/article.pl?sid=06/01/12/1937210
//  Backup with remote compression and storage

// When compression is necessary (and feasible), workload
// distribution becomes more effective with OpenSSH. Just as // distcc allows multiple machines to compile
// simultaneously, OpenSSH lets one system create the
// archive, while another system compresses it:

// tar cf - dirname | ssh remotehost "gzip -c >
// ${TMPFILE}.tar.gz" 

tar cf - local-dir-eliotwalker | ssh -l mctt remote-glos.corruptive.co.uk "gzip -c > corr.tar.gz"