Little help with rsync --exclude

Loving the rsync command and beginning to write some scripts with it.
However I'm hung up on the --exclude function.

Script is tested and works great BEFORE I put the --omit in.
What am I doing wrong in my syntax?

rsync $OPTS /cis/cloverleaf/cis6.0/integrator/ $REMHOST:/home/hci/rsync/integrator --exclude 'processes*' --exclude 'uninstall*' > ${ERRFILE}

So I'm trying to get everything in the /cis/cloverleaf/cis6.0/integrator/ directory, except the files inside /cis/cloverleaf/cis6.0/integrator/abchub/exec/processes directory.
I'm trying to move all that over minus the files inside /processes
and
anything with the word Uninstall in the /integrator directory
over to /home/hci/rsync/integrator on a remote server.

What am I missing with the syntax of --exclude
Help!!!

Maybe the order is wrong? All options first:

rsync $OPTS --exclude 'processes*' --exclude 'uninstall*' /cis/cloverleaf/cis6.0/integrator/ $REMHOST:/home/hci/rsync/integrator > $ERRFILE 2>&1

Also be as precise as possible to not have unwanted matches.
E.g. --exclude '/processes*' --exclude '/uninstall*'

1 Like

what would the syntax look like of I wanted to keep the processes directory, but not include any of the files inside?