The exclude option of Rsync not work right.

Lori Anderson lori.anderson at alcatel.com
Tue Nov 19 17:30:01 EST 2002


Hello,


Can someone explain why my exclude option is not excluding filles as
instructed in my script below.
I have tried multiple methods and still have been unsuccessful in
excluding the one file "test.sql".

The methods I have tried are:

1. Removing EXTRAFLAG variable -a
2. Removing using -a
3. Option --include infront of --exclude and behind of --exclude.
4. rsync /software/testdir/  --exclude='/software/testdir/test.sql'
serv602:/software/testdir/
5. rsync /software/testdir/  --exclude="/software/testdir/test.sql"
serv602:/software/testdir/
6. I used other options indivually which -a uses.
7.  rsync --exclude='/software/testdir/test.sql'
serv602:/software/testdir/  (this didnt copy anything fm the directory)
8. Cmd line -  I attempted the same cmds as in 4 and 5 but it still did
not work right. It copied everything. (using rsync -e ssh)

I have read the manpages, looked at other examples on google, and the
references given from rsync website, and everyone seems to be doing it
the same way I am so I do not see what I am missing.  Except that
I shouldn't be a programmer. :-)

So if someone could give me some hints as to what may be my problem
I would greatly appreciate your help.

Thanks!

Lori



#!/usr/bin/ksh
# Replication Script for serv913 to serv9
# Created Nov 12, 2002


# Variable Settings:
#
#SCOMM_EXCL="/sofware/testdir/test.sql \
                /software/testdir/testfile.html"
#
#APPNCA_EXCL="/software/testdir2/test2.ora \
               /software/testdir2/test2.cfg"
#
#ACLE6i_EXCL="/rootstuff/testdir/names.ora \
               /rootstuff/testdir/names.conf"

#
#RSYNC=/usr/local/bin/rsync
export RSYNC_RSH="ssh"
echo "exporting rsync_rsh"
#export RSYNC
EXTRAFLAGS="$1"

/usr/bin/rsync $EXTRAFLAGS -a /export/home/landser/*
landser at serv602:/usr/local/landser/
echo "just attempted to run home "
#
echo "Now attempting to run testdir"
rsync -av /software/testdir/ --exclude='/software/testdir/test.sql'
landser at serv602:/software/testdir/
echo "just attempted to run testdir"
#

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lori.anderson.vcf
Type: text/x-vcard
Size: 277 bytes
Desc: Card for Lori Anderson
Url : http://lists.samba.org/archive/rsync/attachments/20021119/2dedd475/lori.anderson.vcf


More information about the rsync mailing list