Hi All,
I am using rsync and I see --exclude as an option.
But it says --exclude pattern?
So how can I do an rsync on '/' except exclude /home/nackup?
I am doing:
rsync -avx / /mnt/sdb2/
can I simply do:
rsync -avx --exclude=/home/backup / /mnt/sdb2/
-ML
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
Joseph.
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
Thank you!
I am set now.
-ML
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