rsync filters
Nifty Ubuntu
niftyubuntu at niftyegg.com
Thu Sep 24 20:11:18 UTC 2009
On Thu, Sep 24, 2009 at 12:09 PM, Smoot Carl-Mitchell <smoot at tic.com> wrote:
>
> On Thu, 2009-09-24 at 13:34 -0400, Hal Burgiss wrote:
>
> > What really does not make sense to me, is that I have excluded all toplevel
> > directories. Yet there is different behavior from some as compared to others.
> > Eg, /bin wants to be deleted, /sys does not. Yet, they are specified in
> > *identical* syntax.
>
> Another possibility is the way -F works. It looks for .rsync-filter
> files in each merged directory. I'd see if there are any
> extraneous .filter-rules files lying around. It appears you really want
> a single configuration file with all your exclude rules. You can use
> the --exclude-from=FILE for this purpose or if you want the more general
> --filter syntax you can use the "merge" filter rule to point to a single
> filtering file.
It may also be "cleaner" to script up multiple rsync commands for
each directory of interest. Also checkout "per directory" filter files.
You use of -F is key; From the man page:
-F The -F option is a shorthand for adding two --filter rules to
your command. The first time it is used is a shorthand for this
rule:
--filter=’dir-merge /.rsync-filter’
This tells rsync to look for per-directory .rsync-filter files
that have been sprinkled through the hierarchy and use their
rules to filter the files in the transfer.
More information about the ubuntu-users
mailing list