rsync sends -C and -x options silently

2018-05-15 Thread Anand Buddhdev via rsync
Hello rsync developers and users,

I've just updated some of our CentOS servers from 7.4 to 7.5, and rsync
on these servers went from version 3.0.9 to 3.1.2.

This newer rsync version appears to be sending -C and -x options to the
server, even though they are not set on the client side. The client is
called like this:

rsync -rlptgo -qz --del --timeout=180 user@server /local/path

On the server, we have a wrapper script that parses all the options that
the client sends, with:

options=$(getopt -l server,sender,timeout: -o vnlogDtprzde.iLsf --
$SSH_ORIGINAL_COMMAND)

Now getopt keeps emitting errors that the -C and -x options are
unrecognised.

Is this a recent change in rsync to set these options even if the user
hasn't specified them?

Regards,
Anand

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://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