http://www.perlmonks.org?node_id=360340

ssh remotehost '(cd /dir2copy ; tar cf - .)' | tar xvf - tar cf - . | ssh remotehost '(cd /destdir ; tar xf -)'