# Demonstration of lack of usefulness of "exclude from" in rsyncd.conf.
# See comments added to script below.
rsync version 2.5.6 protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
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@Edelfelt)~MBhome/log: # Test 1: exclusion specified via rsyncd.conf:
# We're only interested in daily_copy.
[396](H:root@Edelfelt)~MBhome/log: cat /etc/rsyncd.conf
motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
[freq_copy]
comment = Rsync definition for frequent copy
# Distribute following as MBHD/MBSTEW and run do_skel on it.
path = /export/home/mbstew
max connections = 1
lock file = /var/run/rsync_freq_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_freq.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]
[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]
[daily_etc]
comment = Rsync definition for daily /etc copy
path = /etc
max connections = 1
lock file = /var/run/rsync_daily_etc
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_etc.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
[397](H:root@Edelfelt)~MBhome/log: # We're doing the daily_copy run only:
[398](H:root@Edelfelt)~MBhome/log: m site
14:13
[399](H:root@Edelfelt)~MBhome/site: cat rsynctest
#!/bin/ksh
false && {
log=/usr/mb/log/freq_copy.log
print "$(date) Starting freq copy" | tee $log
#rsync --dry-run \
rsync \
--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_freq.conf \
/export/home/mbstew/ root@Tazdevil::freq_copy >>$log
}
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@Tazdevil::daily_copy >>$log
##! --exclude-from=/usr/mb/recovery/conf/rsync_daily.conf \
false && {
log=/usr/mb/log/daily_etc.log
print "$(date) Starting /etc copy" | tee $log
# Note that we don't have --delete for /etc.
#rsync --dry-run \
rsync \
--archive \
--update \
--recursive \
--stats \
--devices \
--one-file-system \
--password-file=/etc/rsyncd.passwd \
--rsync-path=/usr/local/bin/rsync \
--verbose \
--verbose \
--exclude-from=/usr/mb/recovery/conf/rsync_daily_etc.conf \
/etc/ root@Tazdevil::daily_etc >>$log
}
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@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@Edelfelt)~MBhome/site: m log
14:14
[402](H:root@Edelfelt)~MBhome/log: wc -l daily_copy.log
15229 daily_copy.log
[403](H:root@Edelfelt)~MBhome/log: # Ahem - rather too long - here are the extremities:
[404](H:root@Edelfelt)~MBhome/log: head 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
[405](H:root@Edelfelt)~MBhome/log: tail $_
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
[406](H:root@Edelfelt)~MBhome/log: # Not enough really - here's some more:
[407](H:root@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
MBhome/backup/mbstew/MBmsg8.sf
MBhome/backup/mbstew/att8.sf
MBhome/backup/mbstew/cus_db8.sf
MBhome/backup/mbstew/eventlog8
MBhome/backup/mbstew/lud8.sf
MBhome/backup/mbstew/nfbtcrash.sw
MBhome/backup/mbstew/ord8.sf
MBhome/backup/mbstew/ordertab8.sf
MBhome/conf/CRlive
MBhome/conf/dbase/log/~usr~mb~log~log
MBhome/conf/dbase/log/~var~adm~messages
MBhome/conf/mbw_interlock
MBhome/conf/run_frequently.lastrun
MBhome/conf/run_monthly.lastrun
MBhome/conf/swapl_at_boot
MBhome/conf/swaps_at_boot
MBhome/conf/vmstat_at_boot
MBhome/doc/geninfo/ADM
MBhome/doc/geninfo/CONTACTS
MBhome/doc/geninfo/CUST
MBhome/doc/geninfo/CUSTADDR
MBhome/doc/geninfo/SER
MBhome/doc/geninfo/TECH
MBhome/doc/geninfo/TYP
MBhome/doc/geninfo/syscheck.out
MBhome/log/BrowserLog
MBhome/log/BrowserLog-1
MBhome/log/CRstatus.log
MBhome/log/S95MBinit.log
MBhome/log/S95MBinit.log-1
MBhome/log/S95MBinit.log-2
MBhome/log/bkupsys.log
MBhome/log/browser.log
MBhome/log/browser.log-1
MBhome/log/browser.log-2
[408](H:root@Edelfelt)~MBhome/log: tail -50 daily_copy.log
projects/www/pages/home/samx/SITES2/New-Index.html
projects/www/pages/home/samx/SITES2/link_html
projects/www/pages/home/samx/SITES2/pink008.jpg
projects/www/pages/home/samx/Sam.html
projects/www/pages/home/samx/Samhome.html
projects/www/pages/home/samx/Toplinks.html
projects/www/pages/home/samx/Welcome.html
projects/www/pages/home/samx/cert.gif
projects/www/pages/home/samx/pe_mrb.jpg
projects/www/pages/home/samx/prologue
projects/www/pages/index.html
samx/.dt/Trash/.trashinfo
samx/.dt/errorlog
samx/.dt/help/samx-Edelfelt-1/browser.hv
samx/.dt/help/samx-Edelfelt-1/browser00.ht
samx/.dt/help/samx-Edelfelt-1/browser01.ht
samx/.dt/sessionlogs/Edelfelt_DISPLAY=Edelfelt:1
samx/.dt/sessionlogs/Edelfelt_DISPLAY=Edelfelt:2
samx/.dt/sessions/dtperf
samx/.dt/sessions/dtwmfp.session
samx/.dt/sessions/home/dt.resources
samx/.dt/sessions/home/dt.session
samx/.dt/sessions/home/dt.settings
samx/.dt/startlog
samx/.dt/startlog.old
samx/SWAP
samx/SWAP01
samx/continue.sw
samx/core
samx/idshp0101
sax/rel/lib/btask/CRbserv.sw
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@Edelfelt)~MBhome/log: # Test 2: I'll now specify exclusion via the command line.
[410](H:root@Edelfelt)~MBhome/log: # Done outside