Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

remote rsync

Discussion in 'General Discussion' started by szakamafa, Sep 13, 2008.

  1. szakamafa

    szakamafa Member

    Joined:
    Jun 25, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    How should i use rsync to remote send users directories in /home to other server to /home?
     
  2. UBERHOST

    UBERHOST Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    California, US
    Assuming the SSH port is 22 on the remote host, and you are pushing the files from the server from which you issue the rsync command, and only want to send select user accounts:

    rsync -avz -e ssh ~user1 ~user2 ~user3 root@destination.com:/home

    Notes:
    1. Replace "user1" etc with actual account user names. The ~ (tilde) must be placed in front of each user name.

    2. If SSH on the receiving host is on a custom port, replace ssh with 'ssh -p 1234' where "1234" is the actual port number. Yes, the single quotes are necessary.

    3. You can use the IP address instead of "domain.com" if you prefer.


    This is if you want to pull files from another host. In other words, if you issue the rsync command from the destination host instead of the origin host:

    rsync -av root@domain.com:/home/username /home

    Hope this helps!
    Rick
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice