I've just started a new Software Development job but I've basically been given loads of sysadmin stuff to do because the development team consists of only 2 people + the CTO. I've got pretty much zero experience with kind of stuff and focused mainly on desktop programming at University. So hopefully you guys can help me out with what I'm trying to do here...
So, we'll have two Amazon EC2 instances which will start out exactly the same (but set to different locations as Amazon has been pretty volatile lately) with one acting as the master and one as a backup. They both run Windows Server 2008 but have been configured with XAMPP to serve up a mySQL/PHP web service. The idea is, that in an outage or the like, we can change our DNS settings to point to the backup instance simply to minimise downtime. As there's a transactional database, and file uploads, I need to keep everything in sync. The problem is that the backup instance won't be running all of the time. I'm told that we need to keep it down at all times (except for when we "sync" the servers) in order to save costs.
From what I can tell a master-to-master replication between the databases would work fine as it would essentially "sync up" when the instance comes online. Am I right in thinking that would work? And how would be the best way to sync up the directories? Another issue I've been thinking about is I'm simply "backing up" the main server to the backup server, when the backup server is actually being used (in an outage) how can the process be automatically reversed?
Like I said, I'm a total noob when it comes to this kind of stuff but I'm fairly excited to learn about this stuff. My superiors at my work don't seem to have a clue so I'm pretty keen on trying to be the "go to guy". Any help or links or book recommendations would be greatly appreciated