Re: rsync exclusions

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



On Tue, Oct 06, 2009, Joseph L. Casale wrote:
>>can I simply do:
>>
>>rsync -avx --exclude=/home/backup / /mnt/sdb2/
>
>The exclude is relative from the path specified in the source.
>
>Check this out:
>http://articles.slicehost.com/2007/10/10/rsync-exclude-files-and-folders

You may want to also look at the -F option to rsync that allows
you to put .rsync-filter files in directories that has patterns
to be excluded under that directory.  Then one can use an rsync
command such as ``rsync --delete-excluded -aHrxF ...'' which will
delete any files on the destination that would be excluded by the
exclude filters.

That is one might have a file, /var/.rsync filter that contained
something like this from this system.

- *.pid
- *.lock
- *.sock
- postgresql/run/.s.PGSQL*
- deliver/tmp/dl.*
- findutils/tmp/*
# sockets
- sasl/saslauthd/mux
- mysql/mysql.sock
- whoson/run/whoson.s
- whoson/run/whoson.d
- postfix/private/tlsmgr
- postfix/private/rewrite
- postfix/private/bounce
- postfix/private/defer
- postfix/private/trace
- postfix/private/verify
- postfix/private/proxymap
- postfix/private/smtp
- postfix/private/relay
- postfix/private/error
- postfix/private/local
- postfix/private/virtual
- postfix/private/lmtp
- postfix/private/anvil
- postfix/private/scache
- postfix/private/smtp-amavis
- postfix/public/flush
- postfix/public/showq
- postfix/public/pre-cleanup
- postfix/public/cleanup
- postgresql/run/.s.PGSQL.5432
- clamav/clamd.sock
- courier-authlib/spool/authdaemon/socket
- zope/var/zopectlsock
# FIFOs
- postfix/public/pickup
- postfix/public/qmgr
- hylafax/FIFO

Bill
-- 
INTERNET:   bill@xxxxxxxxxxxxx  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

UNIX was not designed to stop you from doing stupid things, because that
would also stop you from doing clever things. -- Doug Gwyn
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux