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.

RSYNC to Remote Server

Discussion in 'General Discussion' started by freemchr, Jan 13, 2004.

  1. freemchr

    freemchr Member

    Joined:
    Dec 17, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi Guys,

    Wondering if you could give me some advice and possible give me an idea on how i may be able to do this.

    I have a server and it is secured via SSH2 and disallowing root to login to the box. ie must su - before access.

    I want to use Rsync to backup this server to a remote server i have however, i dont know where to start.

    What is the best way of doing this? and what would i have in the script to backup the server including mysql etc?

    I want it to be incremental which is why Rsync was chosen.

    Any advice is greatly appreciated.

    Thanks
     
  2. dysk

    dysk Well-Known Member

    Joined:
    Apr 22, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Hi-
    Rsync is not technically incremental, because the destination files are overwritten with the most current versions, while something like a tape allows you to go back to a backup earlier than the latest.
    With rsync, there is a risk that a file will be corrupted and/or deleted, and then the backup overwritten before you have a chance to restore it.
    Now to answer your technical question, I would use rsync daemon mode, which would bypass your ssh problems. Do remember to use rsync's IP restrictions, or iptables to be sure you aren't creating a security abyss.
    Good luck setting things up.

    Regards,
    Erek Dyskant
    Unix consultant
     
  3. jdawes

    jdawes Well-Known Member

    Joined:
    Aug 7, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Australia
    would you be able to use this sort of method to maintain a completely real time backup of a server, something like using raid on hdd except for whole servers?
     
  4. freemchr

    freemchr Member

    Joined:
    Dec 17, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1

    What methodology would you use for incremental backups to an offsite server?
     
  5. dysk

    dysk Well-Known Member

    Joined:
    Apr 22, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    for incremental backups over a network, see http://rdiff-backup.stanford.edu/

    About rsync: You can't use it to make a completely realtime mirror, but it can be close. You can set it up in the crontab so that it runs frequently, but obivously the more you run it the more bandwidth you consume.

    There are filesystem based solutions, but I honestly don't know a lot about them.


    Regards,
    Erek Dyskant
    Unix Consultant
     
Loading...

Share This Page