On 5/9/2008 6:45 AM, Richard Ivarson wrote:
When you use rsync with option --delete and --exclude (for example exclude='*.bak') then rsync will exclude such files from source and destination and hence also not delete *.bak files on the destination.

However, would it be possible to still make rsync delete such excluded files on the destination?

There is a --delete-excluded option in rsync 3.0.2 that does just that. The rsync in the Cygwin distro doesn't support it, but you can build your own version of 3.0.2 using cygport and the attached files.

--
David Rothenberger  ----  [EMAIL PROTECTED]

Live Free or Live in Massachusetts.
DESCRIPTION="Rsync"
HOMEPAGE="http://rsync.samba.org/";
SRC_URI="http://rsync.samba.org/ftp/rsync/src/${P}.tar.gz";

DIFF_EXCLUDES="*.test"

# Local Variables:
# fill-column: 72
# mode: sh
# sh-indentation: 2
# End:
diff -urN origsrc/rsync-3.0.2/CYGWIN-PATCHES/README 
src/rsync-3.0.2/CYGWIN-PATCHES/README
--- origsrc/rsync-3.0.2/CYGWIN-PATCHES/README   1969-12-31 16:00:00.000000000 
-0800
+++ src/rsync-3.0.2/CYGWIN-PATCHES/README       2008-04-10 13:41:55.631250000 
-0700
@@ -0,0 +1,123 @@
+rsync
+------------------------------------------
+rsync is a file transfer program. rsync uses the 'rsync algorithm' which
+provides a very fast method for bringing remote files into sync. It does this 
by
+sending just the differences in the files across the link, without requiring
+that both sets of files are present at one of the ends of the link beforehand.
+
+Runtime requirements:
+  cygwin-1.5.25-11
+  libiconv2-1.11-1
+  libpopt0-1.6.4-4
+
+Build requirements:
+  autoconf-4-1
+  automake-2-1
+  binutils-20060817-1
+  cygport-0.2.10-1
+  gcc-3.4.4-3
+  libiconv-1.11-1
+  popt-1.6.4-4
+
+Canonical homepage:
+  http://rsync.samba.org/
+
+Canonical download:
+  http://rsync.samba.org/ftp/rsync/
+  
+------------------------------------
+
+Build instructions:
+  unpack rsync-3.0.2-0-src.tar.bz2
+    if you use setup to install this src package, it will be
+        unpacked under /usr/src automatically
+  cd /usr/src
+  cygport rsync-3.0.2-0 all
+  
+This will create:
+  /usr/src/rsync-3.0.2-0.tar.bz2
+  /usr/src/rsync-3.0.2-0-src.tar.bz2
+
+Or use 'cygport rsync-3.0.2-0 prep' to get a patched source directory.
+
+To find out the files included in the binary distribution, you can
+use "cygcheck -l rsync", or browse the listing for the appropriate
+version at <http://cygwin.com/packages/>.
+
+------------------
+
+Mini-HOWTO to use as a service:
+
+1) be sure to have a valid /etc/rsyncd.conf ("man rsyncd.conf" for help)
+2) to install service: ("cygrunsrv --help" for help)
+   cygrunsrv -I "rsyncd" -p /usr/bin/rsync -a '--daemon --no-detach'
+3) to remove service:
+   cygrunsrv -R "rsyncd"
+
+-------------------------------------------
+
+Port Notes:
+
+----- version 3.0.2-0 -----
+New upstream release. Fixes a security issue with extended attribute
+support, which isn't enabled for Cygwin anyway.
+
+----- version 3.0.1-0 -----
+New upstream release.
+
+----- version 3.0.0-0 -----
+New upstream release.
+
+----- version 2.6.9-2 -----
+Security fix patch (kudos to David Rothenberger for pointing it to me):
+http://www.suse.de/%7Ekrahmer/rsync-2.6.9-fname-obo.diff
+
+----- version 2.6.9-1 -----
+No patch used.
+
+----- version 2.6.3-1 -----
+Kept Sjoerd Mullender's patch for the textmode issue as the only patch.
+
+----- version 2.6.2-3 -----
+Added Sjoerd Mullender's patch for the new textmode issue:
+http://www.cygwin.com/ml/cygwin/2004-09/msg01022.html
+
+----- version 2.6.2-2 -----
+Added patch for the August 2004 security advisory:
+http://rsync.samba.org/#security_aug04
+
+----- version 2.6.2-1 -----
+No patch used.
+
+----- version 2.6.0-1 -----
+No patch used.
+
+----- version 2.5.7-2 -----
+Moved man pages under the /usr/share tree.
+
+----- version 2.5.7-1 -----
+Identical to 2.5.6-2, almost:
+1. security advisory:
+http://www.mail-archive.com/[EMAIL PROTECTED]/msg08782.html
+2. moved documentation under the /usr/share tree
+
+----- version 2.5.6-2 -----
+Compiled against cygwin-1.5.0 experimental library,
+with support for 64-bit file offsets and more.
+
+----- version 2.5.6-1 -----
+Compiled with gcc version 3.2 from now on
+
+----- version 2.5.5-2 -----
+Compiled with gcc version 3.2 20020818 (prerelease)
+Included Anthony Heading's patch to avoid dead child processes
+http://sources.redhat.com/ml/cygwin/2002-09/msg01155.html
+
+----- version 2.5.5-1 -----
+No special patch was needed for this version.
+
+Daemon mode sometimes produces "read error: Connection reset by peer" at the
+very end of transfer.
+
+Cygwin port maintained by: Lapo Luchini <[EMAIL PROTECTED]>
+This release produced by: David Rothenberger <[EMAIL PROTECTED]>
diff -urN origsrc/rsync-3.0.2/CYGWIN-PATCHES/setup.hint 
src/rsync-3.0.2/CYGWIN-PATCHES/setup.hint
--- origsrc/rsync-3.0.2/CYGWIN-PATCHES/setup.hint       1969-12-31 
16:00:00.000000000 -0800
+++ src/rsync-3.0.2/CYGWIN-PATCHES/setup.hint   2008-04-10 13:33:14.568750000 
-0700
@@ -0,0 +1,9 @@
+sdesc: "Fast remote file transfer program (can use existing data to minimize 
transfer)"
+ldesc: "rsync is a file transfer program. rsync uses the 'rsync algorithm'
+which provides a very fast method for bringing
+remote files into sync. It does this by sending just the
+differences in the files across the link, without requiring
+that both sets of files are present at one of the ends of the
+link beforehand."
+category: Net
+requires: cygwin libpopt0
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to