1753886 Members
7142 Online
108809 Solutions
New Discussion

Re: Rsync exclusion

 
SOLVED
Go to solution
Belinda Dermody
Super Advisor

Rsync exclusion

I have rsync running between my two 11i system in VA and Texas. I have read the man pages but I am trying to use an exclusion list or something to clean up my script. For example I have a /usr/local directory on my LOCAL system with a number of sub directories but a DATA directory files is not needed on the REMOTE machine. I have it working right now to do a seperate rsync process with a for loop in my weekly process.
ex:
LOC_DIR="bin sbin etc share"
for l in $LOC_DIR
do
rsync -arxz $l xx.x.xx.x:$LOC_DIR
done

I have something like this for a number of data directories but some of them have a large number of subdirectories that do not need to be copied...

any suggestion using exclusion or excluded list would be helpful.

HAPPY HOLIDAYS to you ALL ....
1 REPLY 1
Rainer von Bongartz
Honored Contributor
Solution

Re: Rsync exclusion

use the -- exclude clause of rsync

i.e.

rs --compress \
-v \
--delete \
--rsh=/usr/bin/ssh \
--stats \
--exclude=cache.dsk \
--exclude=dil*.nsf \
--archive \
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...