Backup in a single command line

Mon 30 July 2007

If you want to do a simple backup of a directory, and also to send the archive over ssh on another machine, here is the useful command:

    # tar czvf - /usr/local/etc/www/data | ssh user@IP  "cat > www.tar.gz"