excludes

tim rsync at nsr500.net
Tue Mar 2 01:18:34 GMT 2004


I have tweaked the excludes file after tests comparing the original with 
the backup.  This excludes file is specifically targeted for older rsync 
versions as noted.

rgds,
tim.

# whole system rsync excludes
# rsync version 2.5.4 protocol version 26, linux 2.2.x, 2.4.x
# includes before excludes
# rsync a nsr500 d net

### tmp & cache anywhere
+ tmp/
- **/tmp/*
# mozilla
+ Cache/
- **/Cache/*
# ccache.samba.org
+ ccache/
- **/ccache/*
+ .ccache/
- **/.ccache/*
# old netscape
+ xover-cache/
- **/xover-cache/*
+ .netscape/cache/
- **/.netscape/cache/*

### object files
# special library obj (RedHat specific???)
+ /usr/*/lib/**.o
+ /usr/lib/**.o
# kernel modules
+ /lib/modules/**.o
# all others
- *.o

### backup & core
- *~
- core
- core.*

### well known transient
+ /tmpfs/
- /tmpfs/*
+ /proc/
- /proc/*
+ /floppy/
- /floppy/*
+ /net/
- /net/*
+ /.automount/
- /.automount/*
+ /mnt/
- /mnt/*
+ /cdrom/
- /cdrom/*

### i386 kernel architecture
# s/i386$/xxx/ for arch 'xxx'
+ usr/src/*/arch
+ usr/src/*/arch/i386
- usr/src/*/arch/*
+ usr/src/*/include
+ usr/src/*/include/asm
+ usr/src/*/include/asm-i386
+ usr/src/*/include/asm-generic
- usr/src/*/include/asm-*

### mounted Windows partitions
- win386.swp
+ windows/options/install/
- **/windows/options/install/*
+ TEMP/
- **/TEMP/*
+ Temp/
- **/Temp/*
+ temp/
- **/temp/*
# problem for Crossover Office???
#+ Temporary\ Internet\ Files/
#- **/Temporary\ Internet\ Files/*

### local squid cache config
+ /spare/
+ /spare/log
+ /spare/squid/
- /spare/*
- /spare/squid/*

### end

An edited dry run log using the above:

#  rsync -avvn --exclude-from=/rsync/exclude \
    machine:/ /snapshot/machine
opening connection using ssh machine \
    rsync --server --sender -vvnlogDtpr . /
root at machine's password:
receiving file list ...
...
including directory backup because of pattern /backup/
excluding file etc/X11/XF86Config~ because of pattern *~
...
including directory etc/skel/.kde/share/apps/kfm/tmp because of pattern tmp/
...
including file lib/modules/2.2.25Ole/ipv4/ip_masq_user.o because of pattern 
/lib/modules/**.o
...
including file usr/lib/bcc/i386/crt0.o because of pattern /usr/lib/**.o
...
excluding file usr/src/redhat/SOURCES/rsync-2.5.4/generator.c.~1~ because 
of pattern *~
...
excluding file usr/src/linux-2.2.25/fs/ext3/dir.o because of pattern *.o
...
including directory usr/src/linux-2.2.25/include because of pattern 
usr/src/*/include
including directory usr/src/linux-2.2.25/include/asm-generic because of 
pattern usr/src/*/include/asm-generic
including directory usr/src/linux-2.2.25/include/asm-i386 because of 
pattern usr/src/*/include/asm-i386
excluding directory usr/src/linux-2.2.25/include/asm-mips because of 
pattern usr/src/*/include/asm-*
...
including directory usr/src/linux-2.2.25/arch because of pattern usr/src/*/arch
including directory usr/src/linux-2.2.25/arch/i386 because of pattern 
usr/src/*/arch/i386
excluding file usr/src/linux-2.2.25/arch/i386/boot/compressed/head.o 
because of pattern *.o
...
including file usr/src/linux-2.2.25/arch/i386/lib/checksum.o because of 
pattern /usr/*/lib/**.o
excluding file usr/src/linux-2.2.25/arch/i386/kernel/i386_ksyms.o because 
of pattern *.o
...
excluding directory usr/src/linux-2.2.25/arch/alpha because of pattern 
usr/src/*/arch/*
...
including directory usr/tmp because of pattern tmp/
...
including directory home/tim/.mozilla/tim/ck08mwab.slt/Cache because of 
pattern Cache/
excluding file home/tim/.mozilla/tim/ck08mwab.slt/Cache/_CACHE_MAP_ because 
of pattern **/Cache/*
...
including directory proc because of pattern /proc/
excluding file proc/apm because of pattern /proc/*
...
including directory spare because of pattern /spare/
including directory spare/squid because of pattern /spare/squid/
excluding directory spare/squid/00 because of pattern /spare/squid/*
including directory spare/log because of pattern /spare/log
done


More information about the rsync mailing list