Use the following command:
rsync -av --include-from=DirectoriesToCopy.txt --include /data/ --exclude='/data/*' --exclude='/*/' / /media/MyDestination/
You need to include /data/ explicitly, you could also have added that to the list in the file. Then exclude all other directories (order is important with includes/excludes).
Note that your usage of
-r was redundant as that's included in
You could also accomplish the same result with:
rsync -av --relative /data/Dir1 /data/Dir2 /media/MyDestination/
It's not rsync that's forcing you to do difficult things just to copy a couple of directories, it just gives you multiple ways of doing the same thing; in some cases going the include/exclude way may be more suited, here I'd do the --relative thing above (without
--relative you'd end up with
/media/MyDestination/Dir2, with the
--relative the whole source path is copied to the destination).