Bug report: "exclude from" in rsyncd.conf is not effective.

Sam Sexton Sam.Sexton at reuters.com
Fri May 9 21:07:28 EST 2003


Resubmission due to user-hostile attachment in previous report.
 
Problem: When "exclude from" is specified in rsyncd.conf on the server
and the referenced file is provided on the server (as well as the source
system), the files are not excluded. Specifying --exclude-from as an
argument with the file on the source system works fine.
 
[128](samx at Edelfelt)~samx: uname -a
SunOS Edelfelt 5.8 Generic_108528-18 sun4u sparc
SUNW,UltraSPARC-IIi-cEngine

rsync  version 2.5.6  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks,
batchfiles, 
              no IPv6, 64-bit system inums, 64-bit internal inums
 
rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.
 
Script started on Tue May 06 14:13:03 2003
14:13
[395](H:root at Edelfelt)~MBhome/log: # Test 1: exclusion specified via
rsyncd.conf:
[396](H:root at Edelfelt)~MBhome/log: cat /etc/rsyncd.conf
motd file = /etc/rsyncd.motd
log  file = /var/log/rsyncd.log
pid  file = /var/run/rsyncd.pid
 
[daily_copy]
    comment = Rsync definition for daily copy
    # Distribute following as MBHD and run do_skel on it.
    path = /export/home
    max connections = 1
    lock file = /var/run/rsync_daily_copy
    uid = root
    gid = root
    read only = no
    list = yes
    # The following file defines all inclusions and exclusions.
    exclude from = /usr/mb/recovery/conf/rsync_daily.conf
    auth users = root
    secrets file = /etc/rsyncd.secrets
    hosts allow = 10.5.203.101,10.5.203.103
    # This is probably for testing only, so I can see what it's like:
    transfer logging
    dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.Z[daily_copy]
 
[398](H:root at Edelfelt)~MBhome/log: m site
[399](H:root at Edelfelt)~MBhome/site: cat rsynctest
#!/bin/ksh
 
log=/usr/mb/log/daily_copy.log
print "$(date) Starting daily copy" | tee $log
#rsync \
rsync --dry-run \
      --archive \
      --update \
      --recursive \
      --stats \
      --devices \
      --one-file-system \
      --password-file=/etc/rsyncd.passwd \
      --rsync-path=/usr/local/bin/rsync \
      --verbose \
      --verbose \
      --delete \
      /export/home/ root at Tazdevil::daily_copy >>$log
##!      --exclude-from=/usr/mb/recovery/conf/rsync_daily.conf \
 
print "$(date) All copies completed" | tee -a $log
 
# Decomment and copy this above for more information, such as which
# files were excluded and the patterns they matched.
#      --verbose \
 
[400](H:root at Edelfelt)~MBhome/site: rsynctest
Tue May  6 14:14:07 GMT 2003 Starting daily copy
Tue May  6 14:14:16 GMT 2003 All copies completed
[401](H:root at Edelfelt)~MBhome/site: m log
14:14
[402](H:root at Edelfelt)~MBhome/log: wc -l daily_copy.log
   15229 daily_copy.log
[403](H:root at Edelfelt)~MBhome/log: # Ahem - rather too long - here are
the extremities:
[407](H:root at Edelfelt)~MBhome/log: head -50 daily_copy.log
Tue May  6 14:14:07 GMT 2003 Starting daily copy
opening tcp connection to Tazdevil port 873
# Connected to Tazdevil rsync server
 
building file list ... 
expand file_list to 4000 bytes, did move
expand file_list to 8000 bytes, did move
expand file_list to 16000 bytes, did move
expand file_list to 32000 bytes, did move
expand file_list to 64000 bytes, did move
expand file_list to 128000 bytes, did move
done
MBhome/backup/mbmanage/fx24+manage.sf
MBhome/backup/mbstew/FXW24Crsh.sw
MBhome/backup/mbstew/MBGbul8.sf
.....
[408](H:root at Edelfelt)~MBhome/log: tail -50 daily_copy.log
.....
sax/vam/ssm/CRssmstart.sw
sax/vam/ssm/continue.sw
sax/vam/ssm/sockservC.sw
sax/vam/ssm/sockserverC.sw
total: matches=0  tag_hits=0  false_alarms=0 data=0
 
Number of files: 18322
Number of files transferred: 15202
Total file size: 1357053836 bytes
Total transferred file size: 1094823591 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 346767
Total bytes written: 407684
Total bytes read: 60927
 
wrote 407684 bytes  read 60927 bytes  49327.47 bytes/sec
total size is 1357053836  speedup is 2895.91
Tue May  6 14:14:16 GMT 2003 All copies completed

[409](H:root at Edelfelt)~MBhome/log: # Test 2: I'll now specify exclusion
via the command line.
[411](H:root at Edelfelt)~MBhome/log: 
Script started on Tue May 06 14:17:03 2003
14:17
[412](H:root at Edelfelt)~MBhome/site: cat /etc/rsyncd.conf
motd file = /etc/rsyncd.motd
log  file = /var/log/rsyncd.log
pid  file = /var/run/rsyncd.pid
 
[daily_copy]
    comment = Rsync definition for daily copy
    # Distribute following as MBHD and run do_skel on it.
    path = /export/home
    max connections = 1
    lock file = /var/run/rsync_daily_copy
    uid = root
    gid = root
    read only = no
    list = yes
    # The following file defines all inclusions and exclusions.
    # exclude from = /usr/mb/recovery/conf/rsync_daily.conf
    auth users = root
    secrets file = /etc/rsyncd.secrets
    hosts allow = 10.5.203.101,10.5.203.103
    # This is probably for testing only, so I can see what it's like:
    transfer logging
    dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.Z[daily_copy]
 
[413](H:root at Edelfelt)~MBhome/site: cat rsynctest
#!/bin/ksh
 
log=/usr/mb/log/daily_copy.log
print "$(date) Starting daily copy" | tee $log
#rsync \
rsync --dry-run \
      --archive \
      --update \
      --recursive \
      --stats \
      --devices \
      --one-file-system \
      --password-file=/etc/rsyncd.passwd \
      --rsync-path=/usr/local/bin/rsync \
      --verbose \
      --verbose \
      --delete \
      --exclude-from=/usr/mb/recovery/conf/rsync_daily.conf \
      /export/home/ root at Tazdevil::daily_copy
<mailto:root at Tazdevil::daily_copy>  >>$log
 
print "$(date) All copies completed" | tee -a $log
 
[414](H:root at Edelfelt)~MBhome/site: rsynctest
Tue May  6 14:17:56 GMT 2003 Starting daily copy
Tue May  6 14:17:57 GMT 2003 All copies completed
[415](H:root at Edelfelt)~MBhome/site: m log
14:18
[416](H:root at Edelfelt)~MBhome/log: wc -l daily_copy.log
      59 daily_copy.log
[417](H:root at Edelfelt)~MBhome/log: # Rather fewer this time!
[418](H:root at Edelfelt)~MBhome/log: cat daily_copy.log
Tue May  6 14:17:56 GMT 2003 Starting daily copy
opening tcp connection to Tazdevil port 873
# Connected to Tazdevil rsync server
 
building file list ... 
expand file_list to 4000 bytes, did move
excluding directory lost+found because of pattern /lost+found
excluding directory MBhome/doc/geninfo because of pattern
/MBhome/doc/geninfo/
excluding directory MBhome/tmp because of pattern /MBhome/tmp/
excluding directory MBhome/backup because of pattern /MBhome/backup/
excluding directory MBhome/presift because of pattern /MBhome/presift/
excluding directory MBhome/conf/dbase/log because of pattern
/MBhome/conf/dbase/log
excluding file MBhome/conf/mbw_interlock because of pattern
/MBhome/conf/mbw_interlock
excluding file MBhome/conf/swapl_at_boot because of pattern
/MBhome/conf/*at_boot
excluding file MBhome/conf/swaps_at_boot because of pattern
/MBhome/conf/*at_boot
excluding file MBhome/conf/vmstat_at_boot because of pattern
/MBhome/conf/*at_boot
excluding file MBhome/conf/CRlive because of pattern /MBhome/conf/CRlive
excluding file MBhome/conf/run_daily.lastrun because of pattern
/MBhome/conf/*.lastrun
excluding file MBhome/conf/run_frequently.lastrun because of pattern
/MBhome/conf/*.lastrun
excluding file MBhome/conf/run_monthly.lastrun because of pattern
/MBhome/conf/*.lastrun
excluding directory MBhome/log because of pattern /MBhome/log/
excluding file MBhome/recovery/conf/run_freq because of pattern
/MBhome/recovery/conf/run_*
excluding file MBhome/recovery/conf/last_freq because of pattern
/MBhome/recovery/conf/last*
excluding file mbstew/NFcrashws.sw because of pattern *crash*.sw
expand file_list to 8000 bytes, did move
excluding file mbstew/nfbtcrash.sw because of pattern *crash*.sw
excluding file mbstew/continue.sw because of pattern continue.sw
excluding file sax/rel/lib/btask/CRbserv.sw because of pattern CR*.sw
excluding file sax/vam/ssm/CRssmstart.sw because of pattern CR*.sw
excluding file sax/vam/ssm/sockservC.sw because of pattern *C.sw
excluding file sax/vam/ssm/sockserverC.sw because of pattern *C.sw
excluding file sax/vam/ssm/continue.sw because of pattern continue.sw
excluding directory samx/.dt because of pattern /samx/.dt
excluding file samx/continue.sw because of pattern continue.sw
excluding file samx/core because of pattern core
excluding file samx/SWAP01 because of pattern SWAP*
excluding file samx/idshp0101 because of pattern idshp*
excluding file samx/SWAP because of pattern SWAP*
excluding directory projects because of pattern /projects
excluding directory kellym because of pattern /kellym
excluding directory TT_DB because of pattern /TT_DB
done
MBhome/site/rsynctest
mbstew/MBmsg8.sf
total: matches=0  tag_hits=0  false_alarms=0 data=0
 
Number of files: 1543
Number of files transferred: 2
Total file size: 262168186 bytes
Total transferred file size: 2965971 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 30800
Total bytes written: 31559
Total bytes read: 127
 
wrote 31559 bytes  read 127 bytes  21124.00 bytes/sec
total size is 262168186  speedup is 8273.94
Tue May  6 14:17:57 GMT 2003 All copies completed
[419](H:root at Edelfelt)~MBhome/log: # Worked a treat.
 
script done on Tue May 06 14:18:36 2003

 

 

/Sam

 

Sam Sexton <mailto:sam.sexton at reuters.com>  

Reuters Coventry

Automated Dealing Technologies

Phone: +44 24 7625 6562

Fax:     +44 24 7655 5203

 


--------------------------------------------------------------- -
        Visit our Internet site at http://www.reuters.com

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit http://www.reuters.com/messaging

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.



More information about the rsync mailing list