On Mon, Feb 17, 2003 at 05:02:54PM +0100, Lars Ellenberg wrote:
> suppose you have a file list like generated by find $BASEDIR -print
> 
> pipe through
> # include all files with necessary paths
> sed -ne "s,^${BASEDIR//\\*/\\*}/,+ /,;"'
>       :l1;/+ ../{p;s,/$,,;s,[^/]*$,,;b l1;};' |
> sort -u > tmp.rsync # sort and remove duplicates
> # exclude evrything not explicitly included...
> echo "- *" >> tmp.rsync
> 
> and do rsync -av --include-from tmp.rsync remote:$BASEDIR $LOCALTARGET

I've got it sorted. Ted gave me a useful comment (other than to
re-read what I'd re-read to death) that got my thinking out of
a rut.

Just so it is on the record for the next poor googling SOB 
who tries to decipher that man page without a Rosetta stone:

rsync --include-from /root/include --exclude-from /root/exclude -avz [EMAIL 
PROTECTED]:/ /Backups/

where the include and exclude files are:

include /var/www/somewebsite
        /var/www/andanotherone
        /var/www
        /var

exclude /*
        /var/*
        /var/web/*

does the trick. You can expand this same set to select
any set of particular files and directories. If anyone needs a
more detailed example, they may contact me off line as I'd 
rather not post my actual backup sequence and user names.
 
> to understand whats happening:
> 
> On Sun, Feb 16, 2003 at 09:05:25PM -0800, Ted Deppner wrote:
> > Advice:  Read the man page.  Again.  Repeat as necessary.
> 
> ;)

The man pages are not very good unless you already know the
answer. If the author included the above example, I suggest
many people would get an immediate AHA! and there would be
fewer queries floating about the net.

It does no good reading it over and over. The words 
stay the same on the page and your interpretation stays the 
same in your head. That's why God gave us the Internet and
a world full of people to talk to. :-)

"Everything worth knowing is inside a human head somewhere"

As soon as my test run completes, I'm going to take
some time out and help someone else on this list who
also has had problems, albiet a different set. As they
say, "Do unto others..."

--
------------------------------------------------------
       IN MY NAME:            Dale Amon, CEO/MD
  No Mushrooms clouds over    Islandone Society
    London and New York.      www.islandone.org
------------------------------------------------------

Reply via email to