Re: include/exclude patterns to copy just certain files?

2004-07-07 Thread Bob Proulx
Wayne Davison wrote:
 Bob Proulx wrote:
rsync -a --include '*/' --include '**/a1/foo' --exclude * . example.com:/tmp/
 
 Yes, that is the way to use include/exclude without first figuring
 out where all the foo files are.  As you noted that results in all
 directories in the tree being created.

Darn.

 The easiest way around this is to switch from include/exclude to using
 the --files-from option, like this:
 
 find . -name foo | rsync -a --files-from=- . example.com:/tmp/

Yes!  That is exactly what I want.  I see that it is a new option.  I
had not noticed its arrival.  In fact I needed to upgrade to get it.

I really think that is a good design direction.  Keep all of the file
finding tasks in 'find' and use it to drive rsync.  A nice modular
approach that follows the traditional UNIX philosophy.  I like it!

As an enhancement I would really like it even more if the --from0
option could be combined with --files-from to be --files-from0.  It is
more compact and has a similar style to find's --print0 option.
Although I will probably use -av0 with this more often than anything
else so this is not a big deal.

Thank you for pointing me to that option.  It works great.

Bob
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: include/exclude patterns to copy just certain files?

2004-07-05 Thread Wayne Davison
On Sat, Jul 03, 2004 at 05:25:05PM -0600, Bob Proulx wrote:
   rsync -a --include '*/' --include '**/a1/foo' --exclude * . example.com:/tmp/

Yes, that is the way to use include/exclude without first figuring
out where all the foo files are.  As you noted that results in all
directories in the tree being created.

The easiest way around this is to switch from include/exclude to using
the --files-from option, like this:

find . -name foo | rsync -a --files-from=- . example.com:/tmp/

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


include/exclude patterns to copy just certain files?

2004-07-03 Thread Bob Proulx
I am attempting to copy only certain files down a directory tree.  I
know which files I want.  I could generate a file of just those with
'find'.  But having read the docs I have been trying to use the
--include and --exclude patterns to have rsync pick the right files
itself.  But I can't figure it out.  I am suspecting that I can't do
what I want to do.

Source example, this is what I have, foos and bars are files:

  dir1/a1/foo
  dir1/a2/foo
  dir1/a3/bar
  dir1/bar
  dir2/a1/foo
  dir2/a2/foo
  dir2/a3/bar
  dir2/bar

Destination example, this is what I want, just the foos:

  dir1/a1/foo
  dir2/a1/foo

Here is how I am trying to do it.

  rsync -a --include '**/a1/foo' --exclude * . example.com:/tmp/

But that does not match any files.  0 files to consider is the
result.  The man page has an example with --include */.

  rsync -a --include '*/' --include '**/a1/foo' --exclude * . example.com:/tmp/

That does too much and creates all of the directories even if there is
no file foo in the directory.  That is, in my example above all of
the */a2 directories are also copied.

Can anyone think of a way to do this?

The actual source directories are relatively large with 20k total
files or so in a deep hiearchy tree.  So expanding them on the command
line is not good since it will frequently exceed ARG_MAX.
Conceptually something like the following would work if the directory
was not too big and I could also line up the destination to match the
source.

  rsync -a $(find . -name foo -print) example.com:/tmp/  # bad example

  for file in $(find . -name foo -print); do  # another bad example
dirname=$(dirname $file)
rsync -a $file example.com:$dirname/  # 20k times seconds per ssh...
  done

That is just very, very slow.  I can almost use fsh but just the same
it would be much cleaner to do this entirely within rsync.

Thanks
Bob
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Trouble with include/exclude patterns

2003-02-06 Thread Anand Buddhdev
On Thu, Feb 06, 2003 at 01:58:28AM -, Max Bowsher wrote:

  --include .mozilla
  --include .mozilla/arb/
  --exclude .mozilla/arb/*
  --include .mozilla/arb/kfgj0v2y.slt/
  --include .mozilla/arb/kfgj0v2y.slt/bookmarks.html
  --include .mozilla/arb/kfgj0v2y.slt/prefs.js
  --exclude .mozilla/arb/kfgj0v2y.slt/*
  
  Close, but not quite.  The order of a couple lines is reversed and
 
 Duh. Thanks for picking up on that.
 
  that might copy more than one file from the .mozilla/arb dir.
 
 It would copy nothing from arb, surely?
 
  I'd also suggest putting the lines into an include file so that the
  command-line only needs an --include-from=file_name directive.  The
  lines would get +/- prefixes to tell it what to include/exclude:
 
 I don't think .mozilla was in rpm:
 
 + /rpm/SRPMS/
 - /rpm/*
 + /.mozilla/
 + /.mozilla/arb/
 - /.mozilla/*
 + /.mozilla/arb/kfgj0v2y.slt/
 - /.mozilla/arb/*
 + /.mozilla/arb/kfgj0v2y.slt/bookmarks.html
 + /.mozilla/arb/kfgj0v2y.slt/prefs.js
 - /.mozilla/arb/kfgj0v2y.slt/*

This works just as I wanted it to :)  Now I also understand the
exclude/include logic better. Thanks guys!

-- 
Anand Buddhdev
http://anand.org
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Trouble with include/exclude patterns

2003-02-05 Thread Anand Buddhdev
I'm using rsync 2.5.4 on my RedHat 7.3 client laptop and rsync 2.5.5
on my RedHat 8.0 server. On the client, I have a directory rpm with
5 subdirectories, out of which I only want to copy the one called SRPMS
across. I also have another directory .mozilla out of which I want to
copy across 2 files. I have constructed the following rsync invocation:

rsync -e ssh -av --delete \
--exclude='/rpm/BUILD' --exclude='/rpm/SOURCES' --exclude='/rpm/SPECS' 
--exclude='/rpm/RPMS' \
--include='.mozilla/arb/kfgj0v2y.slt/bookmarks.html' \
--include='.mozilla/arb/kfgj0v2y.slt/prefs.js' \
--exclude='.mozilla' \
.mozilla \
rpm \
$SERVER:laptop-backup

Now, this works correct for the rpm directory, by only copying
rpm/SRPMS, and leaving out rpm/BUILD, rpm/SOURCES, /rpm/SPECS and
rpm/RPMS.

However, it does not copy my bookmarks.html and prefs.js files. If I
add one more -v to the rsync command, I see this:

excluding directory .mozilla because of pattern .mozilla

So it seems the entire .mozilla directory is skipped, despite my 2
--include statements.

I have read the man page over and over, and I can't see what's wrong.

Any idea what I'm doing wrong? And any ideas on reducing those 4
--excludes to one --exclude and one --include for the rpm directory?

Thanks,

-- 
Anand Buddhdev
http://anand.org
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: Trouble with include/exclude patterns

2003-02-05 Thread Max Bowsher
Anand Buddhdev wrote:
 I'm using rsync 2.5.4 on my RedHat 7.3 client laptop and rsync 2.5.5
 on my RedHat 8.0 server. On the client, I have a directory rpm with
 5 subdirectories, out of which I only want to copy the one called
 SRPMS 
 across. I also have another directory .mozilla out of which I want
 to 
 copy across 2 files. I have constructed the following rsync
 invocation: 
 
 rsync -e ssh -av --delete \
 --exclude='/rpm/BUILD' --exclude='/rpm/SOURCES'
 --exclude='/rpm/SPECS' --exclude='/rpm/RPMS' \ 
 --include='.mozilla/arb/kfgj0v2y.slt/bookmarks.html' \
 --include='.mozilla/arb/kfgj0v2y.slt/prefs.js' \
 --exclude='.mozilla' \
 .mozilla \
 rpm \
 $SERVER:laptop-backup
 
 Now, this works correct for the rpm directory, by only copying
 rpm/SRPMS, and leaving out rpm/BUILD, rpm/SOURCES, /rpm/SPECS and
 rpm/RPMS.
 
 However, it does not copy my bookmarks.html and prefs.js files. If I
 add one more -v to the rsync command, I see this:
 
 excluding directory .mozilla because of pattern .mozilla
 
 So it seems the entire .mozilla directory is skipped, despite my 2
 --include statements.
 
 I have read the man page over and over, and I can't see what's wrong.

--include .mozilla
--include .mozilla/arb/
--exclude .mozilla/arb/*
--include .mozilla/arb/kfgj0v2y.slt/
--include .mozilla/arb/kfgj0v2y.slt/bookmarks.html
--include .mozilla/arb/kfgj0v2y.slt/prefs.js
--exclude .mozilla/arb/kfgj0v2y.slt/*

Yes, its messy.

I don't think there is a better way.

 Any idea what I'm doing wrong? And any ideas on reducing those 4
 --excludes to one --exclude and one --include for the rpm directory?

would:

--include /rpm/SRPMS
--exclude /rpm/*

do what you want?


Max.

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: Trouble with include/exclude patterns

2003-02-05 Thread Wayne Davison
On Thu, Feb 06, 2003 at 01:17:34AM -, Max Bowsher wrote:
 --include .mozilla
 --include .mozilla/arb/
 --exclude .mozilla/arb/*
 --include .mozilla/arb/kfgj0v2y.slt/
 --include .mozilla/arb/kfgj0v2y.slt/bookmarks.html
 --include .mozilla/arb/kfgj0v2y.slt/prefs.js
 --exclude .mozilla/arb/kfgj0v2y.slt/*

Close, but not quite.  The order of a couple lines is reversed and that
might copy more than one file from the .mozilla/arb dir.

I'd also suggest putting the lines into an include file so that the
command-line only needs an --include-from=file_name directive.  The
lines would get +/- prefixes to tell it what to include/exclude:

+ /rpm/SRPMS/
+ /rpm/.mozilla/
- /rpm/*
+ /rpm/.mozilla/arb/
- /rpm/.mozilla/*
+ /rpm/.mozilla/arb/kfgj0v2y.slt/
- /rpm/.mozilla/arb/*
+ /rpm/.mozilla/arb/kfgj0v2y.slt/bookmarks.html
+ /rpm/.mozilla/arb/kfgj0v2y.slt/prefs.js
- /rpm/.mozilla/arb/kfgj0v2y.slt/*

I _think_ that will work.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: Trouble with include/exclude patterns

2003-02-05 Thread Max Bowsher
Wayne Davison wrote:
 On Thu, Feb 06, 2003 at 01:17:34AM -, Max Bowsher wrote:
 --include .mozilla
 --include .mozilla/arb/
 --exclude .mozilla/arb/*
 --include .mozilla/arb/kfgj0v2y.slt/
 --include .mozilla/arb/kfgj0v2y.slt/bookmarks.html
 --include .mozilla/arb/kfgj0v2y.slt/prefs.js
 --exclude .mozilla/arb/kfgj0v2y.slt/*
 
 Close, but not quite.  The order of a couple lines is reversed and

Duh. Thanks for picking up on that.

 that might copy more than one file from the .mozilla/arb dir.

It would copy nothing from arb, surely?

 I'd also suggest putting the lines into an include file so that the
 command-line only needs an --include-from=file_name directive.  The
 lines would get +/- prefixes to tell it what to include/exclude:

I don't think .mozilla was in rpm:

+ /rpm/SRPMS/
- /rpm/*
+ /.mozilla/
+ /.mozilla/arb/
- /.mozilla/*
+ /.mozilla/arb/kfgj0v2y.slt/
- /.mozilla/arb/*
+ /.mozilla/arb/kfgj0v2y.slt/bookmarks.html
+ /.mozilla/arb/kfgj0v2y.slt/prefs.js
- /.mozilla/arb/kfgj0v2y.slt/*


Max.

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: Trouble with include/exclude patterns

2003-02-05 Thread Wayne Davison
On Thu, Feb 06, 2003 at 01:58:28AM -, Max Bowsher wrote:
 It would copy nothing from arb, surely?

Sorry, I meant to say that it might copy more from .mozzilla than just
arb, but a re-edit ruined that thought.

 I don't think .mozilla was in rpm:

You're right, I missed that.  Duh.  Hopefully third time's a charm.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: include-exclude patterns

2002-12-10 Thread marco
Le Mon, 9 Dec 2002 21:22:48 -0800
jw schultz [EMAIL PROTECTED] écrivait :

 You forgot to include /var/ and /var/lib/ so it never even
 sees /var/lib/zope/

I even tried this but it include the whole /var/ folder !
I just want /var/lib/zope.

-- 
marco
--
Clé PGP publique : https://iftbqp.mine.nu/marco.asc



msg05731/pgp0.pgp
Description: PGP signature


Re: include-exclude patterns

2002-12-10 Thread marco
Le Mon, 9 Dec 2002 21:22:48 -0800
jw schultz [EMAIL PROTECTED] écrivait :

I found this on the FAQ-O-Matic from the rsync webite

http://rsync.samba.org/fom-serve/cache/164.html

I'm so agree...
Is it possible to make it true ?

thanks 

-- 
marco
--
Clé PGP publique : https://iftbqp.mine.nu/marco.asc



msg05732/pgp0.pgp
Description: PGP signature


Re: include-exclude patterns

2002-12-10 Thread Paul Faure
This is why regular expression matching is 1000 times more powerful.
I submitted a patch a few months ago.

marco ([EMAIL PROTECTED]) wrote:
 Le Mon, 9 Dec 2002 21:22:48 -0800
 jw schultz [EMAIL PROTECTED] ?crivait :
 
 I found this on the FAQ-O-Matic from the rsync webite
 
 http://rsync.samba.org/fom-serve/cache/164.html
 
 I'm so agree...
 Is it possible to make it true ?
 
 thanks 
 
 -- 
 marco
 --
 Cl? PGP publique : https://iftbqp.mine.nu/marco.asc



-- 
Paul N. Faure BEng  613.266.3286
Carleton University Systems Eng paul-at-faure-dot-ca
Chief Technical Officer, CertainKey Inc.paul-at-certainkey-dot-com
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: include-exclude patterns

2002-12-10 Thread Wayne Davison
On Tue, Dec 10, 2002 at 09:18:06AM -0500, marco wrote:
 I even tried this but it include the whole /var/ folder !
 I just want /var/lib/zope.

The solution is that after you include something that is too general,
you need to exclude what you don't want.  Like this:


/etc
/var
- /*
/var/lib
- /var/*
/var/lib/zope
- /var/lib/*

Explanation:  The inclusion of /var is needed just to get rsync to
descend into that directory.  At that point, you need to add rules for
what to do inside of /var, which is to just descend into lib and exclude
everything else.  The final two rules tell rsync what to do once inside
of /var/lib (include zope, exclude everything else).  At that point
everything in the zope hierarchy will be included.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



include-exclude patterns

2002-12-09 Thread marco
Hi, 
I just subscribe to ask you a question about patterns in exclude-include
files.
I just want some folders to be rsynced to a remote machine.
What I tried is :
IncludeFile
-
/etc/
/var/lib/zope/
- /*
---
result of 
$$ rsync -avvrn --delete --delete-excluded
--include-from=/backup-include -e ssh / /backup
is
expand file_list to 4000 bytes, did move
 including directory etc because of pattern /etc/
 excluding directory usr because of pattern /*
 excluding directory bin because of pattern /*
 excluding directory var because of pattern /*
 excluding directory boot because of pattern /*
 excluding directory dev because of pattern /*
 excluding directory home because of pattern /*
 excluding directory lib because of pattern /*
 excluding directory mnt because of pattern /*
 excluding directory proc because of pattern /*
 excluding directory root because of pattern /*
 excluding directory sbin because of pattern /*
 excluding directory tmp because of pattern /*
 excluding directory floppy because of pattern /*
 excluding directory cdrom because of pattern /*
 excluding directory initrd because of pattern /*
 done

What about /var/lib/zope/ ?

I lost my afternoon on this
Could you explain me what I am missing ?

thanks
-- 
marco
--
Clé PGP publique : https://iftbqp.mine.nu/marco.asc
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: include-exclude patterns

2002-12-09 Thread jw schultz
On Tue, Dec 10, 2002 at 12:08:54AM -0500, marco wrote:
 Hi, 
 I just subscribe to ask you a question about patterns in exclude-include
 files.
 I just want some folders to be rsynced to a remote machine.
 What I tried is :
 IncludeFile
 -
 /etc/
 /var/lib/zope/
 - /*
 ---
 result of 
 $$ rsync -avvrn --delete --delete-excluded
 --include-from=/backup-include -e ssh / /backup
 is
 expand file_list to 4000 bytes, did move
  including directory etc because of pattern /etc/
  excluding directory usr because of pattern /*
  excluding directory bin because of pattern /*
  excluding directory var because of pattern /*
  excluding directory boot because of pattern /*
  excluding directory dev because of pattern /*
  excluding directory home because of pattern /*
  excluding directory lib because of pattern /*
  excluding directory mnt because of pattern /*
  excluding directory proc because of pattern /*
  excluding directory root because of pattern /*
  excluding directory sbin because of pattern /*
  excluding directory tmp because of pattern /*
  excluding directory floppy because of pattern /*
  excluding directory cdrom because of pattern /*
  excluding directory initrd because of pattern /*
  done
 
 What about /var/lib/zope/ ?
 
 I lost my afternoon on this
 Could you explain me what I am missing ?

You forgot to include /var/ and /var/lib/ so it never even
sees /var/lib/zope/

-- 

J.W. SchultzPegasystems Technologies
email address:  [EMAIL PROTECTED]

Remember Cernan and Schmitt
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Include / exclude patterns

2002-11-28 Thread Carlos Molina
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Greetings.

I'm trying to make some backups using rsync, but I have some questions 
about it.

First, on the receiving side, i make a test with this line.

rsync -vv -e ssh --recursive --include-from=include.txt  
cmolina@www-01:/ /tmp/cmolina

On include.txt I have.
+ etc
+ home/cmolina/source
+ home/cmolina
+ var/spool
- - dev/
- - home/cmolina/
- - tmp/
- - root/
- - disk2/
- - home/
- - usr/
- - lib/
- - var/
- - bin/
- - boot/
- - dev/
- - etc/
- - floppy/
- - initrd/
- - lost+found
- - proc/
- - opt/
- - sbin/
- - vmlinuz
- - /*

Note that the source path is /.

Well, in resume, I'm trying to bypass the default rsync selection 
mechanism (include all the objects that aren't specified on the list), 
because we want to deny (exclude) all filenames, directories, archives, 
etc, and only permit the files, directories, SUBDIRECTORIES, that we 
specify on a include file.

For example, we want to exclude anything, and only include the following 
directories (and it's contents)


/etc
/home/cmolina/source
/home/cmolina
/var/spool

The problem is that rsync rejects to take it, because I have the - home/ 
directive on the include file. The conclusion, rsync takes the exclude/ 
include mechanism recursively. If rsync see that /home is exclude, it 
marks this directory and exclude all the /home dir and it's subdirs.

Any one can help me on a rule that permit me exclude anything, but 
permit me the followings dirs (and sub dirs)

/etc
/home/cmolina/source
/home/cmolina
/var/spool

On resume, exclude all, but include the specified.

Thanks a lot.

PD: I see a patch on the list that propose to use regexp with rsync. 
Will you include it on the following releases...??
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE95kMjho8byKxa2jgRAsMIAJ9tU33sIDFwwf/7OZx/fcX69FjeqwCfTiWt
o+iXUVvX66uTzpLAK1cC0MQ=
=VmBn
-END PGP SIGNATURE-


--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html


Re: Include / exclude patterns

2002-11-28 Thread Max Bowsher
Carlos Molina [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Greetings.

 I'm trying to make some backups using rsync, but I have some questions
 about it.

 First, on the receiving side, i make a test with this line.

 rsync -vv -e ssh --recursive --include-from=include.txt
 cmolina@www-01:/ /tmp/cmolina

 On include.txt I have.
 + etc
 + home/cmolina/source
 + home/cmolina
 + var/spool
 - - dev/
 - - home/cmolina/
 - - tmp/
 - - root/
 - - disk2/
 - - home/
 - - usr/
 - - lib/
 - - var/
 - - bin/
 - - boot/
 - - dev/
 - - etc/
 - - floppy/
 - - initrd/
 - - lost+found
 - - proc/
 - - opt/
 - - sbin/
 - - vmlinuz
 - - /*

What are you tring to do with the double - signs?

 Note that the source path is /.

 Well, in resume, I'm trying to bypass the default rsync selection
 mechanism (include all the objects that aren't specified on the list),
 because we want to deny (exclude) all filenames, directories,
 archives, etc, and only permit the files, directories,
 SUBDIRECTORIES, that we specify on a include file.

 For example, we want to exclude anything, and only include the
 following directories (and it's contents)


 /etc
 /home/cmolina/source
 /home/cmolina
 /var/spool

If you want everything under /home/cmolina, why is /home/cmolina/source also
in your list?

Anyway:

+ /etc
+ /home/cmolina
+ /var/spool
- /*

Max.

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Include / exclude patterns.

2002-11-28 Thread Carlos Molina
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

|Carlos Molina [EMAIL PROTECTED] wrote:
|
|-BEGIN PGP SIGNED MESSAGE-
|Hash: SHA1
|
|Greetings.
|
|I'm trying to make some backups using rsync, but I have some questions
|about it.
|
|First, on the receiving side, i make a test with this line.
|
|rsync -vv -e ssh --recursive --include-from=include.txt
|cmolina@www-01:/ /tmp/cmolina
|
|On include.txt I have.
|+ etc
|+ home/cmolina/source
|+ home/cmolina
|+ var/spool
|- - dev/
|- - home/cmolina/
|- - tmp/
|- - root/
|- - disk2/
|- - home/
|- - usr/
|- - lib/
|- - var/
|- - bin/
|- - boot/
|- - dev/
|- - etc/
|- - floppy/
|- - initrd/
|- - lost+found
|- - proc/
|- - opt/
|- - sbin/
|- - vmlinuz
|- - /*
|
|
|What are you tring to do with the double - signs?


Sorry, it was a type error

|
|Note that the source path is /.
|
|Well, in resume, I'm trying to bypass the default rsync selection
|mechanism (include all the objects that aren't specified on the list),
|because we want to deny (exclude) all filenames, directories,
|archives, etc, and only permit the files, directories,
|SUBDIRECTORIES, that we specify on a include file.
|
|For example, we want to exclude anything, and only include the
|following directories (and it's contents)
|
|
|/etc
|/home/cmolina/source
|/home/cmolina
|/var/spool
|
|
|If you want everything under /home/cmolina, why is /home/cmolina/source 
also
|in your list?
|
|Anyway:
|
|+ /etc
|+ /home/cmolina
|+ /var/spool
|- /*
|
|Max.
|

Ok, here is my include.txt

+ /etc
+ /home/cmolina
+ /var/log
- - - /*

And  now here is my command and output...
rsync -vv -e ssh --recursive --include-from=include.txt root@www-01:/ 
/tmp/cmolina

opening connection using ssh -l root www-01 rsync --server --sender -vvr . /
receiving file list ...
expand file_list to 4000 bytes, did move
excluding directory lost+found because of pattern /*
excluding directory root because of pattern /*
excluding directory boot because of pattern /*
excluding directory home because of pattern /*
excluding directory usr because of pattern /*
excluding directory var because of pattern /*
excluding file vmlinuz because of pattern /*
excluding directory tmp because of pattern /*
excluding directory lib because of pattern /*
excluding directory sbin because of pattern /*
including directory etc because of pattern /etc
expand file_list to 8000 bytes, did move
expand file_list to 8000 bytes, did move
excluding directory bin because of pattern /*
excluding directory dev because of pattern /*
excluding directory mnt because of pattern /*
excluding directory proc because of pattern /*
excluding directory floppy because of pattern /*
excluding directory cdrom because of pattern /*
excluding directory initrd because of pattern /*
excluding file .journal because of pattern /*
excluding file vmlinuz.old because of pattern /*
excluding directory disk2 because of pattern /*
excluding file vmlinuz-custom1 because of pattern /*
excluding file snmpd.conf because of pattern /*
excluding file index.html because of pattern /*
excluding file backup.txt because of pattern /*
done
etc/.ViperDB
etc/.pwd.lock
etc/.serial.conf.old
etc/CheckProcess.conf
.
.
.
etc etc

rsync isn't include directories under /home and /var, because it exclude 
recursively on /*

IS there a way to manage it...??

Note that source directory on rsync call is /

Thanks a lot.


|

- -BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE95mDoho8byKxa2jgRAp2DAJ9mnfxblVrDHOfquFrrxq9/cKOm+ACgh001
hlUIvNVVDkkyCyKgv+GlJCQ=
=QGUD
- -END PGP SIGNATURE-

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE95mFAho8byKxa2jgRAt5bAKCFPM5AiUX/ztHpRzJH2w0AUH/nnQCbBgl0
sOP/HH8fexhBhgVHYKQXUjg=
=hpj7
-END PGP SIGNATURE-


--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html


Re: Include / exclude patterns

2002-11-28 Thread Max Bowsher
Carlos Molina [EMAIL PROTECTED] wrote:

 + /etc
 + /home/cmolina
 + /var/log
 - - /*

Huh? - - ? Mistake again?

 rsync isn't include directories under /home and /var, because it
 exclude recursively on /*

Well sure, but it would have included dirs under /home/cmolina  and
/var/log.

The / in /* anchors to the toplevel.

Works for me, and looks like it was working for you from the output you
sent.

Max.

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: Include / exclude patterns

2002-11-28 Thread Max Bowsher
Carlos Molina [EMAIL PROTECTED] wrote:

 Nope, isn't works, because rsync only fetchs /etc directory.
 On the output, you could see that /home nad /var is excluded (I
 suppose that is excluded by /* pattern)

Blah. Your right. This will work:

+ /etc
+ /home
+ /home/cmolina
- /home/*
+ /var
+ /var/spool
- /var/*
- /*


 Can you explain me with more detail what you refer with 
 The / in /* anchors to the toplevel.
 

/* will match root-of-rsync/foo, but not root-of-rsync/foo/bar.
Of course, (and this is what I forgot), if root/foo is excluded, then
rsync will never bother to look inside at root/foo/bar.

Max.

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



include/exclude patterns to copy just certain files?

-- Thread Bob Proulx
->













  
  Re: include/exclude patterns to copy just certain files?
  
  
  
  
  
  








	

	rsync 

	
		
			-- Thread --
			-- Date --
			




Find 
			
		
	



	
	
	




 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx



Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw
 


Re: include/exclude patterns to copy just certain files?
Wayne Davison









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google

include/exclude patterns to copy just certain files?

-- Thread Bob Proulx
->












  
  Re: include/exclude patterns to copy just certain files?
  
  
  
  
  
  








	

	rsync 

	
		
			-- Thread --
			-- Date --
			




Find 
			
		
	



	
	
	




 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FFFFFF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Wayne Davison


Re: include/exclude patterns to copy just certain files?
Bob Proulx


Re: include/exclude patterns to copy just certain files?
Jan-Benedict Glaw



Re: include/exclude patterns to copy just certain files?
Wayne Davison
 









 






  
  





Reply via email to



  
  





 
 








 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
googl