rsync -avz --stats --dry-run --relative -e "ssh -i path/to/somekey" "[email protected]:/remote/path/./data/*/datatype/" ~/local/path/data/datatype/
Replace the local and remote path as per your requirements. This is for getting data from the datatype folder for all folders within the data folder. Put path to your ssh key in place of path/to/somekey
and replace [email protected]
with your connection string for your remote machine.
This does the following-
--stats
shows the progress and other statistics--dry-run
performs a check run but does not tranfer any data. Remove it to actually intiate the data transfer