T
T
Timofey Dergachev2013-11-18 22:26:25
linux
Timofey Dergachev, 2013-11-18 22:26:25

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

1 answer(s)
D
Dan Ivanov, 2013-11-18
@exeto

--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 question

Ask a Question

731 491 924 answers to any question