I need a simple and working (several) excludeoption inside my team rsync. Suppose I exclude a fileand a directory:
- /var/www/html/test.txt
- / var / www / html / image /
What I've done:
rsync -avz --exclude="/var/www/html/test.txt" --exclude="/var/www/html/images/" /var/www/html root@xx.xx.xx.xx:/var/www
or
rsync -avz --exclude=/var/www/html/test.txt --exclude=/var/www/html/images/ /var/www/html root@xx.xx.xx.xx:/var/www
or
rsync -avz --exclude /var/www/html/test.txt --exclude /var/www/html/images/ /var/www/html root@xx.xx.xx.xx:/var/www
..
But, however, --excludeDOES NOT WORK!
Everything is coming out!
- How to do this in this simple format, please?
Note. I also do not want to use an external exception list. I just want everything in one simple team.
source
share