rsync with --exclude files
Dave Dykstra
dwd at bell-labs.com
Wed Jul 31 06:53:02 EST 2002
The paths that the exclude algorithm see begin with "circuit_design" in
your case, so your excludes should begin with /circuit_design rather
than /fs22/a/circuit_design. rsync -vv gives a lot of help with debugging
excludes.
- Dave Dykstra
On Thu, Jul 25, 2002 at 06:06:28PM +0800, Leaw, Chern Jian wrote:
> HI,
>
> I'm trying to exclude some files & directories from a filesystem which I
> would like to copy to a different site. I did:
>
> # rsync -avz --exclude-file=/fs21/tmp/perl_scripts/exclude.txt
> /fs22/a/circuit_design mickey.willow.com:/cpu/store/design
>
> where file /fs21/tmp/perl_scripts/exclude.txt contains the following
> directories and files to be excluded from /fs22/a/circuit_design :
> # cat /fs21/tmp/perl_scripts/exclude.txt
> /fs22/a/circuit_design/file1
> fs22/a/circuit_design/file2
> fs22/a/circuit_design/dir1
>
> I'm invoking rsync from a machine named winnie.willow.com to transfer
> files/directories in /fs22/a/circuit_design to
> mickey.willow.com:/cpu/store/design.
> However, it still copies all files or directories in the filesystem
> /fs22/a/circuit_design to mickey.willow.com:/cpu/store/design. It should
> not include the files/directories mentioned in the
> /fs21/tmp/perl_scripts/exclude.txt file.
>
> I've tried with the following for excluding just 1 file or directory and
> it works:
> # rsync -avz --exclude=/fs22/a/circuit_design/file1 /fs22/a/circuit_design
> mickey.willow.com:/cpu/store/design
>
> It does not however work when I did the following for excluding >1
> file/directory:
> rsync -avz --exclude=/fs22/a/circuit_design/file1
> --exclude=/fs22/a/circuit_design/file2 /fs22/a/circuit_design
> mickey.willow.com:/cpu/store/design
>
> I was wondering if this should be the way to rsync a filesystem, excluding
> some files/ directories?
>
> Please help.
>
> Thanks.
>
>
>
>
> --
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
More information about the rsync
mailing list