tar czf - /home/user | ssh user@host "cat > backup.tar.gz"
Stream a tar backup to a remote host
The - as filename makes tar write the archive to stdout, which is piped over SSH and saved remotely, with no local archive file or disk space needed. Restore in reverse with the remote cat piping back into tar. The remote side only needs cat.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.