Previous Section  < Day Day Up >  Next Section

Recipe 16.11. Customizing Filepaths in rsync

16.11.1 Problem

You want to be able to specify filepaths, instead of dumping everything into a single directory.

16.11.2 Solution

Use the -R option:

$ rsync -aR -e ssh  /webfiles/site1  stinkpad.test.net:/www/public

This creates /www/public/webfiles/site1, instead of /www/public/site1.

16.11.3 Discussion

This is especially useful when you are transferring several directories and want to maintain separate filepaths for each one.

16.11.4 See Also

  • rsync(1)

    Previous Section  < Day Day Up >  Next Section