Zip files and exclude directories

  Administration

Zip and exclude one directory

Change to the directory…

# cd /var/www/vhosts/domainname/httpdocs/
# zip -r domainname.zip * -x \*test\*

2 directories

# zip -r domainname.zip * -x \*test\* \*test2\*