The problem I had was the following:
- I had a lot of data (~ 33 Gb) on computer "foo" which wanted to back up before formatting the hard disk and installing FreeBSD 7.2;
- There was however not enough room in computer "foo" to create the .tar file (just 13 Gb);
- Thanks to a colleague, I had access to another computer "bar" with lot of free space (~750 Gb).
tar cvz -f - ./ | ssh bar "cat > \backup.tar.gz"
The "tar" process will write the .tar.gz file containing data from the "./" directory into the pipe. The "ssh" sends whatever is written into the pipe to the "bar" computer, where a "cat" command will save the data into "backup.tar.gz". This results in the .tar.gz file being written directly on the remote computer.