tar pipe

No, not tar from a cigarette! tar as in the *nix Tape ARchive.

I needed to back up my test gentoo box at home so I could install RedHat Enterprise Linux 3 AS. Since I needed to repartition, the best way was to haul a tar file off to another computer, using ssh and a tar pipe, like so:

tar cf - * | ssh hostname "cat > /my/tar/directory/tarfile.tar"

About 20 minutes later, and I’ve got a 1.4 Gb tarball on my other linux box. Not quite sure how I’m going to get it BACK to the test box, but I’m sure I’ll find something.

Or even better:
tar cvf - /mnt/gentoo/* |ssh root@target 'cd /; tar -xpf -'