Recipe 16.11. Customizing Filepaths in rsync

 < Day Day Up > 

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)

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net