public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* rsync's --delete and --exclude option
@ 2008-05-09 14:10 Richard Ivarson
  2008-05-09 14:48 ` David Rothenberger
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Ivarson @ 2008-05-09 14:10 UTC (permalink / raw)
  To: cygwin

Hi,

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?
For example, when have source and destination rsynced hosts which thousands 
of files and you decide to add more excludes, it'd be nice to let delete now 
unused files on the destination, too, even if their source counterparts are 
now on the exclude list.

-Richard


--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rsync's --delete and --exclude option
  2008-05-09 14:10 rsync's --delete and --exclude option Richard Ivarson
@ 2008-05-09 14:48 ` David Rothenberger
  2008-10-13 21:57   ` Lapo Luchini
  0 siblings, 1 reply; 3+ messages in thread
From: David Rothenberger @ 2008-05-09 14:48 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

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  ----  daveroth@acm.org

Live Free or Live in Massachusetts.

[-- Attachment #2: rsync-3.0.2-0.cygport --]
[-- Type: text/plain, Size: 214 bytes --]

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:

[-- Attachment #3: rsync-3.0.2-0.cygwin.patch --]
[-- Type: text/plain, Size: 4606 bytes --]

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/rsync@lists.samba.org/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 <lapo@lapo.it>
+This release produced by: David Rothenberger <daveroth@acm.org>
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

[-- Attachment #4: rsync-3.0.2-0.src.patch --]
[-- Type: text/plain, Size: 0 bytes --]



[-- Attachment #5: Type: text/plain, Size: 218 bytes --]

--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rsync's --delete and --exclude option
  2008-05-09 14:48 ` David Rothenberger
@ 2008-10-13 21:57   ` Lapo Luchini
  0 siblings, 0 replies; 3+ messages in thread
From: Lapo Luchini @ 2008-10-13 21:57 UTC (permalink / raw)
  To: cygwin

David Rothenberger wrote:
> 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.
> 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, thanks for having filled in my (too) long hiatus.

I will now produce a new 3.0.4-1 port to upload to the servers...

-- 
Lapo Luchini - http://lapo.it/

“In God we trust. Everybody else we verify using PGP!” (Tim Newsome)


--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-13 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-09 14:10 rsync's --delete and --exclude option Richard Ivarson
2008-05-09 14:48 ` David Rothenberger
2008-10-13 21:57   ` Lapo Luchini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).