Setting Up A File Mirror

Discussion in 'Site & Server Administration' started by MMGant, Nov 26, 2007.

  1. #1
    I have a large game file archive (~100 GB) website. I'd like to add a mirror site for the files so users can download them from either server.

    What's the easiest way to mirror the files to the second server? New files are added daily, so I'll need to update the mirror multiple times a day.
     
    MMGant, Nov 26, 2007 IP
  2. jexxie

    jexxie Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The easiest way would be if you have shell access on both servers, and can initiate an rsync:
    rsync -avz --progress --delete /path/to/files server:/path/to/files/on/server
    Code (markup):
     
    jexxie, Nov 26, 2007 IP
  3. MMGant

    MMGant Peon

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks. Do I just set up a cron job to run it three or four times a day?
     
    MMGant, Nov 27, 2007 IP
  4. jexxie

    jexxie Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you setup a password-less SSH key, then yes, you could automate it via a cronjob.
    ssh-keygen -t dsa
    Code (markup):
     
    jexxie, Nov 27, 2007 IP
  5. MMGant

    MMGant Peon

    Messages:
    95
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I don't have root access to my servers, though I do have shell access. Will that prevent me from using rsync via a cronjob?
     
    MMGant, Nov 30, 2007 IP