as above
I think it's best explained with an example.
The "sfolder" contains 10s of folders and 100s of files inside them.
I want to copy "sfolder2 and its contents" to /mnt/destination/destination-folder.
I tried
and in all cases, stats report that only the "sfolder2" folder was transferred and the 10s of folders and 100s of files inside "sfolder2" was ignored.
What am I doing wrong?
My real aim is to copy multiple folders (from my sample folder setup above, sfolder2 and sfolder4) from the source to my destination. I'm only using 1 folder for now while testing.
Thanks
I think it's best explained with an example.
Code:
/mnt/source/source-folder
-> sfolder1
-> sfolder2
-> sfolder3
-> sfolder4
The "sfolder" contains 10s of folders and 100s of files inside them.
I want to copy "sfolder2 and its contents" to /mnt/destination/destination-folder.
I tried
rsync -nriv --stats --include "sfolder2" --exclude "*" /mnt/source/source-folder/ /mnt/destination/destination-folder/
rsync -nriv --stats --include "sfolder2*" --exclude "*" /mnt/source/source-folder/ /mnt/destination/destination-folder/
rsync -nriv --stats --include "*sfolder2*" --exclude "*" /mnt/source/source-folder/ /mnt/destination/destination-folder/
and in all cases, stats report that only the "sfolder2" folder was transferred and the 10s of folders and 100s of files inside "sfolder2" was ignored.
What am I doing wrong?
My real aim is to copy multiple folders (from my sample folder setup above, sfolder2 and sfolder4) from the source to my destination. I'm only using 1 folder for now while testing.
Thanks