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.

automatic sync of directory from server to server

Discussion in 'General Discussion' started by gigamike, Dec 28, 2015.

  1. gigamike

    gigamike Member

    Joined:
    Jan 14, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Guys,

    I have 2 servers and im planning to make a directory always sync updated/parallel automatically and if possible in real time i.e.

    /server1/test/*.* to /server2/test/*.*

    Im thinking of rsync but problem of rsync it requires to manually enter a password i.e.

    /usr/bin/rsync -avzhe ssh root@11.11.11.11:/home/domain.com/public_html/test /home/domain.com/public_html/test

    Any ideas? Im thinking of a cron calling a rsync command

    Thanks in advance,

    Mike
     
  2. gigamike

    gigamike Member

    Joined:
    Jan 14, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    By the way, both servers have WHM so if there is a tool for WHM better i guess.

    Thanks,

    Mike
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,738
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    There's no native functionality in cPanel/WHM to complete this transfer and maintain the same files in the directories. You may want to implement a cron job that syncs the files using the "rsync" utility. You could use a key instead of a password for "rsync". EX:

    How to Setup Rsync with SSH on UNIX / Linux (rsync without password)

    Thank you.
     
Loading...

Share This Page