Mirror web site - backup full server

Discussion in 'HOWTO-Related Questions' started by adrenalinic, Oct 20, 2007.

  1. adrenalinic

    adrenalinic Member

    Hello to all wonderful howtoforge site users! :D

    I have a question about Mirror Web Site HowTo.
    I have already up a locat vps that backup my remote server with rsync and make a mysqlServer replication, but I would ask if with this technique, the mirror can cover all file of system including var/ password file etc etc...

    The local vps can correctly write our system file without problems ?
    I want setting up it how slave server in dns list, because my server company not guarantee uptime service level agreement and is happened to have my vps down even for two days for maintenance!!! and I want solve this possible future situations.

    http://howtoforge.com/mirroring_with_rsync

    Very Thanks.
    Josef
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Basically this should be no problem, but you should exclude special files like the ones in /proc or /dev from the backup.
     
  3. adrenalinic

    adrenalinic Member

    thanks for response,
    but how can preserve ownership of files....
     
  4. sjau

    sjau Local Meanie Moderator

    rsync has a switch that preserves the ownership of the files... however ownership is preserved by the id of the user and group and not by their actual name.
     
  5. adrenalinic

    adrenalinic Member

    hello.
    Have to test this situation with ISpconfig.
    I'm not sure that works.
    but there is not a cool and simple solution to replicate full server?!

    i will search!
     
  6. adrenalinic

    adrenalinic Member

    and......

    if the firts server go down and the slave server is the exact copy,
    all www client make a dns query and bind respond with second slave server...

    at this point,
    the only server visible is the SLAVE, and users server applay changes to Slave server and not to the first....

    therefore when first server turn UP, it contain a old data, because is the SLAVE server that is in rsync with to the first.

    a bidirectional rsync is obviously not possible....
    how it works?!:confused:
     
    Last edited: Oct 22, 2007
  7. falko

    falko Super Moderator Howtoforge Staff

  8. adrenalinic

    adrenalinic Member

    hello.
    I already use mysql replication.
    I mean about website files sync from slave to primary server, when the first server go down more time and the users was used the slave server adding and modifying files....

    and after restore of first server it appear with old data respect the slave server.

    in a simple words...
    i will find the solution for revers sync that not is manual operation but based on automatic configuration...

    (scusmy for bad english !)
     
  9. falko

    falko Super Moderator Howtoforge Staff

    I think you'd have to write your own script that detects when the master goes down and modificatiosn have been done on the slave. That script could then invoke rsync.
     

Share This Page