Answer the question
In order to leave comments, you need to log in
How to override one of the folders when using rsync?
There is a file structure like this:
front/
front/1.txt
back/
back/scripts/
back/.../
back/front/
back/front/2.txt
scripts/
.../
front/
front/1.txt
rsync \
--archive \
--delete --delete-excluded --delete-after --ignore-errors --force \
--compress \
--partial -i \
-e "ssh" \
/path/to/back/ \
/path/to/front \
[email protected]:/path/to/back/
Answer the question
In order to leave comments, you need to log in
Did something like this:
rsync \
--archive \
--delete --delete-excluded --delete-after --ignore-errors --force \
--compress \
--partial -i \
-e "ssh" \
`find /path/to/back/ -maxdepth 1 -mindepth 1 | grep -v /front` \
/path/to/front \
[email protected]:/path/to/back/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question