I need a rsync command which will exclude certain files and directories from source and copy the rest. I got this command working,
sudo rsync -avzh --exclude 'bin' --exclude 'braintree' --exclude 'colinmollenhour' --exclude 'composer' --exclude 'doctrine' --exclude 'fabpot' --exclude 'justinrainbow' --exclude 'league' --exclude 'lusitanian' --exclude 'magento' --exclude 'monolog' --exclude 'oyejorge' --exclude 'pdepend' --exclude 'pelago' --exclude 'phpmd' --exclude 'phpseclib' --exclude 'phpunit' --exclude 'psr' --exclude 'sebastian' --exclude 'seld' --exclude 'sjparkinson' --exclude 'squizlabs' --exclude 'symfony' --exclude 'tedivm' --exclude 'theseer' --exclude 'tubalmartin' --exclude 'zendframework' --exclude 'autoload.php' /var/www/html/magento2/vendor/ /var/www/html/magento2/app/code/
Now this works fine. It does copy everything other than excluded directories but i want this to delete the copied files from source location too. Please advise.
Regards,
Siddhesh