31
11
I'm using rsync to sync files across multiple machines, using the following:
rsync -az -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" \
--delete --delete-excluded --force --exclude=.git --exclude=.bundle \
--exclude=tmp --exclude=log/* --exclude=*.log --exclude=*.pid \
user@host:/path/to/src/ /var/build/dest
I want to exclude all log files from being transferred from the source to destination, and delete all existing ones on the destination. So I'm using --exclude=*.log
with --delete-excluded
which works great.
But I want to keep a certain log file intact on the destination. I want an --exclude-from-delete
option.
Is this possible with rsync?
Similar: How to use rsync to backup a directory without git subdirectory?
– kenorb – 2015-03-18T22:40:17.800