rsync how to

Discussion in 'Server Operation' started by happz, Apr 13, 2010.

  1. happz

    happz Member

    If I want to mirror my ubuntu 9.10 32bit with ispconfig2 using rsync, will my mirror server need to have ispconfig 2 installed as well?

  2. madmac007

    madmac007 New Member


    If you are to rsync to a second server, it is better to have the OS`s the same
    as well as the ispconfig.

    On the 2nd server, you can run this command ( all on one line )
    I use ssh on port 2222

    rsync -ave 'ssh -p 2222' [email protected]:/var/www/html /var/www/html

    This will rsync from your main server at, using root as the user, and rsync from the /var/www/html, to your second server /var/www/html

    Change the folders to meet your needs.

  3. happz

    happz Member

    Thanks. Now if the servers are not in the same network..

    If they are not in the same network then I could just put in the public IP i assume? Also, I if I wanted all sites backed up then the path would be /var/www/ correct? and last, do I not need an account with permissions?

    thanks again,

  4. happz

    happz Member

    Hello again. I follow this

    Problem is that my users does get prompted for a password so I am not sure what went wrong. I followed this information directly. I don't want to setup the cron job if it doesn't work so can anyone help me understand why my /home/someuser is getting prompted? I did add the proper code where the info told me to put it.....

    I guess I can manually run rsync but if anyone knows how i can id the problem it would be great.

  5. falko

    falko Super Moderator ISPConfig Developer

    Are you still prompted for a password if you remove
    from /home/someuser/.ssh/authorized_keys?
  6. happz

    happz Member

    Thanks...I am no longer prompted for a password

    Thanks Falko! Have a great weekend.
  7. falko

    falko Super Moderator ISPConfig Developer

    This means that you used the wrong hostname in the
    part. Use the hostname that
    dig -x [I]ip_address[/I]
  8. happz

    happz Member


    I am running rsync in a little different way maybe. I have one server across town on a static IP and one @ home with a static IP. I am for sure entering the correct so that is strange. Because I had removed the line before and thought that we were finish I have now added it back making very sure to put the server name in the line but it goes back to asking for a password.

    Can i just leave that line out? It is working. I can upload a file via FTP on srv1 and 5 minutes later, it appears on srv2.

    Let me know please...thanks!
  9. falko

    falko Super Moderator ISPConfig Developer

    Yes, you can leave it out. It's just for additional security, that's all. :)

Share This Page