I think where you have : tar zcvf - /usr/local/apache/htdocs | ssh root at 1.2.3.4 "cat > /var/www/html/htdocs.tar.gz" would need to be : tar zcvf - /usr/local/apache/htdocs | ssh root at 1.2.3.4 "cd /tmp/test;tar -zxf -" (to end up with /tmp/test/usr/local/apache/htdocs/* copied over) Regards, Jerry Queirolo