[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync exclusions



On Mon, 2012-01-16 at 10:19 +0000, Sharon Kimble wrote:
> I'm just fine tuning my rsync exclusion file which is called perfectly
> okay and works well, but now \i want to add these lines to it;-
> 
> -/icedove/nipl*
> -/gnash/*
> -/mozilla/firefox/*
> -/opera/*
> 
> Will they work with wildcards like that please to exclude the whole of
> the program and cache?

You just need to try :) But yes, the existing documentation is not the
most easy to read... I had that same problem once...


Below you will find some examples I used some time ago. But please
notice that I was using "include-from" instead of "exclude-from"; you
just need to revert your logic :) these are real life examples that are
being used on production systems to execute timed filesystem replication
of 2 linux boxes...

If you have more doubts please feel free. Just go ahead and try your own
examples... after a few tries you will understand how it works

Hope it helps...



/etc
=================================
#---------------------------------------------files excluded
- /etc/resolv.conf
- /etc/hostname
- /etc/inittab
- /etc/modules
- /etc/passwd
- /etc/group
- /etc/fstab
- /etc/mtab
- /etc/release
- /etc/license.xml
- /etc/license.xml.sign
- /etc/*lock
- /etc/cron.d/hotbackup.cron
#---------------------------------------------dirs excluded
- /etc/hotbackup
- /etc/init.d
- /etc/lilo
- /etc/rc.d
==================================


/home
==================================
#dirs excluded
- /home/lost+found
- /home/shareboxes
- /home/hbmaster
- /home/named/var/run
==================================



/usr
==================================
#
#
#_exclude most
- /usr/doc
- /usr/docs
- /usr/etc
- /usr/include
- /usr/info
- /usr/libexec
- /usr/man
- /usr/sbin
#
#
#
#_/usr/lib: mailscanner, webauth, asterisk, sophos libs, ...
+ /usr/lib/mailscanner
+ /usr/lib/webauth
+ /usr/lib/asterisk
+ /usr/lib/libsavi*
- /usr/lib/*
#
#
#
#_/usr/share: zoneinfo, clamav, phone-auto-config...
+ /usr/share/zoneinfo
+ /usr/share/phone-auto-config
+ /usr/share/clamav
- /usr/share/*
#
============================================


/var
============================================
#---------------------------------------------files excluded
- /var/SWAPFILE*
#
#
#---------------------------------------------dirs excluded
#
#
#------------------------/var/hotbackup
#------------------------ this dir is used for: pgdump, resolv.conf,
fstab and friends !!!
#
#------------------------/var/items
#
- /var/lib/dhcpc
- /var/lib/epak
#- /var/lib/mailfax
#- /var/lib/openldap-data
#- /var/lib/radiusd
#- /var/lib/voicerlib
#
- /var/log
#- /var/log/hotbackup
- /var/lock
- /var/lost+found
#----------------------- /var/notifyd
#
- /var/pgsql
- /var/pgsql-r
#
- /var/run
- /var/restore
- /var/squid
#------------------------ /var/state
- /var/state/*lock
- /var/state/pppoecache.cache
- /var/state/pptp.sessions.conf
#------------------------ /var/syslogmon
- /var/tmp
#- /var/webadmin
- /var/www
#
===================================

> 
> If not, how do I do it please? I've found several sites on the
> internet to explain it but I dont understand what they're saying.
> 
> Thankyou
> Sharon.
> -- 
> A taste of linux = http://www.sharons.org.uk/taste/index.html
> efever = http://www.efever.blogspot.com/
> efever = http://sharon04.livejournal.com/
> Debian 6,0.3, Gnome 1:2.30+7, LibreOffice 3.4.4
> Registered Linux user 334501
> 
> 



Reply to: