Syncing two servers

Discussion in 'Technical' started by bagpiperdude90, Mar 16, 2007.

  1. bagpiperdude90

    bagpiperdude90 ISPConfig Developer ISPConfig Developer

    sorry if its the wrong forum.... :confused:


    Ok,

    So back in January, a friend gave me an older computer, and I decided to stick Fedora 6 on it. Fast forward 2 months later, I have about 20 sites hosted on that computer, running ISPConfig, using the Fedora 6 LAMP perfect setup on howtoforge.

    Then, I bought a new Dell E521, with an AMD 64 X2, NVidia moboard, two SATA hard drive slots, with RAID 1 possible. I have one 160 gb drive in there now. This server was to replace the old server. I hope to use the old server as standby or a development server.




    The problem:
    The old server is IDE hard drive. The new one is SATA.

    The old server has some different hardware (obviously) than the new one. The new server requires an updated kernel to run the graphics card.

    I'm confused about RAID 1, and if it works right out of the box.​




    What I'd like to be able to do:
    I'd like to be able to switch between the servers, based on what IP I forward on my router page. If I need to test something I put on the development server, well, I just forward the port to the correct IP. Also, I need all the sites to be synced between them, along with users from ISPConfig, databases, user accounts, etc. In my mind, the best thing to do is have a master hard drive, with both computers' hard drives copied from that one. Every time I update one computer's drive, I'd sync it onto the master drive, and then sync the other computer's drive to the master.

    I'd also like to be able to have several hard drives to swap in in case one fails.​





    I realize the best thing to do is get another server, with almost exactly the same specs, if not the same as the new one, and ditch the old one. That way I could get an extra hard drive, or maybe an external one, and just sync the two computers via that drive. Set the main computer as the sync server, and the other one goes off of it.

    Instead of getting a new computer, can I just use the new server as the only server, and have several hard drives I can flip in and out to test out some development? Lets say a new version of ISPConfig comes out, and I want to try it out. I'd like to install onto a hard drive, and if it doesn't work, I can just pop in the backup drive, re-sync the two drives, and try again? Ultimately, I'd want to do that sort of thing, but do it between two servers - a live and a development server.


    So, since I can't buy a new computer right now, is it a smart thing to do to go ahead and get another 160gb hard drive and a hard drive enclosure so I can use as external or internal, and do the above on one server?

    Also, if I later need to expand to, say, a 400gb drive, can I copy the image of the 160gb drive to the 400gb, and still have all 400gb available to use? Or will the formatting need to be tweaked so the 400gb drive "sees" all 400gb?

    Also, can I add a RAID 1 configuration, prefferably hardware RAID, without reinstalling everything? If not, can I do that with software RAID?



    Or - am I just going about this the wrong way? Basically, I want insurance in case one drive or computer fails. RAID does that, yes. But then I also want a development server or hard drive. To me, it seems having several hard drives would do that just fine.



    Thanks for the help guys - I've been trying to figure this out the whole freaking day, and I'm getting rather tired and ticked off... I did a search but couldn't find much information about this stuff!

    Thanks for reading, and for any replies!! (!!!!!!!)
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. bagpiperdude90

    bagpiperdude90 ISPConfig Developer ISPConfig Developer

    Thank you so much Falko!

    I'll read them tonight... I have quite a few gigs (see forum user name) since today is Saint Patrick's Day... in comes the money for a new server or several new hard drives.

    I'll post any questions I have later. Thanks for the links, again!
     
  4. bagpiperdude90

    bagpiperdude90 ISPConfig Developer ISPConfig Developer

    hmm. I'm wondering if "dd" would be the best way to do this. I finally decided what I think I'll do.


    I'll get one hard drive case so I can turn a regular hard drive into an external USB drive, one more 160gb hard drive, and a small hard drive (40gb?). I'll fresh install Fedora 6, ISPConfig, etc, and then "dd" the drive onto the 40gb drive. I'll keep the 40gb drive as a fresh install disk, so if I ever have a massive failure and need to reinstall everything, I'll pop in the 40gb drive, and "dd" it over to a larger drive, and start over in adding everybody into ISPConfig (I hope that won't happen!!!!!!!!!). Also, if I get a new server, I can use that as the base config.

    Then, I'll make nightly (or maybe weekly is better, depending on how long "dd" takes?) backups of the hard drive onto the spare 160gb drive. That way, I can go back to it if something terrible happens. Also, I could back it up before updating ISPConfig or something.

    Oh, and one quick question, how does the backup thing in ISPConfig work? I tried doing it, but couldn't re-upload the databases and all the webs to ISPConfig.

    Tell me if I'm going down the road to hell please...

    Thanks!
     
  5. falko

    falko Super Moderator ISPConfig Developer

    I think SystemImager is easier to use than dd. And for mirroring your data I'd use rsync plus MySQL database replication ( http://www.howtoforge.com/mysql_database_replication ).

    You can unzip the backups of the web sites and upload them to the server again with FTP.
    To restore a MySQL database from an SQL dump, have a look here: http://www.howtoforge.com/faq/6_4_en.html
     

Share This Page