I found a way to compress a directory with link files intact. Zip won't work for me.
tar -cvzf UserTemplateBackup.tar.gz "User Template"
to extract
tar -xvzf UserTemplateBackup.tar.gz
Make sure -f
flag is last or you'll get an error
Copy from remote server to your local one
ssh ubuntu@192.168.1.40 "tar --exclude='/var/www/log' -vczpf /var/www" | tar -vxzpf - -C /var/www