Answer the question
In order to leave comments, you need to log in
How to force Rsync with --delete option to ignore a specific folder?
There is rsync with the --delete option. How can I make it ignore a certain folder on the receiving end and not delete it.
Answer the question
In order to leave comments, you need to log in
--exclude=PATTERN
mkdir testrsync
cd testrsync/
mkdir src dst
cd src/
mkdir 1 2 3 4 5
cd ../dst/
mkdir ex
cd ..
rsync -acz --delete --exclude=ex src/ dst/
ls dst/
1 2 3 4 5 ex
rsync -acz --delete src/ dst/
ls dst/
1 2 3 4 5
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question