I have these SRC , DST, COMPARE folders:
1. /opt/SRC
- file1
- file2
- file3
2. /opt/DST
- file1
- file2
3. /opt/COMPARE
- empty
I want files that don't exist in DST to be stored in /opt/COMPARE when I run rsync.
Namely:
ls /opt/COMPARE f3
But when executing:
rsync -avz --compare-dest=/opt/COMPARE /opt/SRC/ /opt/DST
The /opt/COMPARE folder is still empty, why?
What happens is that you understood it wrongly,
I explain:
the flag
--compare-dest=comparar/
is used to assign a folder with which to compareorigen
Now the command should be.
so that it compares
origen
withdestino
and copies the changes to/opt/COMPARE