How do I exclude a folder when using rsync ?
rsync -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/And this is the message I got. But I went into the server and did not see the copied file.
skipping directory .
<f..T...... id_rsantuI included --exclude= but it is still copying from /media/kong/Elements/sgan/dataset/ because I see
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012818.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012819.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012820.png
<f+++++++++ dataset/train/Ouchy-2-Left-crops/crossing/0000000159/0000012821.png 1 1 Answer
you need to use -r flag:rsync -r -i /home/kong/.ssh/id_rsantu --exclude /media/kong/Elements/sgan/dataset/ /media/kong/Elements/sgan/ kongserver@35.123.456.78:~/
from man rsync:-r, --recursive recurse into directories