rsync -avz --no-perms --no-owner --no-group --exclude='<exlude file path>' --exclude='<exclude directory path>/*' <FROM DIRECTORY>/* <TO DIRECTORY>/

eg:

rsync -avz --no-perms --no-owner --no-group --exclude='/var/www/moodel/config.php' --exclude='/var/www/moodle/cache/*' /home/moodle/public_html/* /var/www/moodledev/

Leave a Reply

Your email address will not be published. Required fields are marked *