Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to rsync dirs includes files from path to another exact path that has been rsynced from it

For example :-

path 1 have


want to rsync mysql and home directories only but will be rsync with the same path name

so the result in the rsync place


hope someone help me with the right rsync comand

share|improve this question

migrated from Jul 20 '12 at 1:55

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Something like this?

rsync -av  origin/{home,mysql} destination/
share|improve this answer
what if home into another directory no mysql and home under same directory ? like dir1/dir2/home and mysql will be dir1/mysql – iLinux85 May 19 '12 at 15:25
you can nest {d1,d2{dx,dy}} as you like. If things become too complex you can put directories in a text file and use --files-from=whattorsync.list or call rsync multiple times from a script. – dschulz May 19 '12 at 15:54
sorry the main command you post didn't rsync the home and mysql directories – iLinux85 May 27 '12 at 9:11
sorry, I assumed your shell is bash. – dschulz May 27 '12 at 17:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.