The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    16
    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
     
Loading...

Share This Page