I think this command will do the trick
ssh user@host "cd /path/to/data/;tar zc directory_name" | tar zx
EDIT: an earlier version was with two wrong "f" options.
Now, first of all you have to execute this command from the target host. And details to be explained:
- ssh user@host will open connection to host machine, from where the data is to be transfered.
- cd /path/to/data will take to the directory where required data is stored
- tar zc * will initiate compression and put it to the STDOUT
- Now pipe(|) will pipeline the STDOUT of the source to the STDIN of the destination where "tar zx " is running and continuously decompression data stream coming from source.
As you can see this command compresses on-the-fly and saves bandwidth. You can use other compressions as well for better results, but remember, compression and decompression needs CPU cycles.