I want to host a 5 domains and 2 mySQL databases on an EC2 server. I already know the basics and can manage servers but I've never worked with EC2. I've read that when there's a shutdown or a restart, the data may get lost, so that's what I want to avoid. I can handle 5-10 or even 20 minutes of downtime every month but I don't want to have hours or days of downtime.
So far, I have this in mind:
- Create 2 Elastic IPs for the nameservers.
- Create an EC2 instance where I host the files and database.
- I would install WHM / CPanel for easier management.
- I would make off-server backups every 3 hours of everything.
- Most of the files on the server rarely change. All images are hosted on S3 and Cloudfront, so I wouldn't mind restoring something from 3 hours ago.
Is there a way to take "snapshots" every X hours on Amazon and an easy way to restore them if the server goes down?
I assume if it does go down, all I would need to do is:
- Restore the snapshot.
- Add the IPs back to the new instance.
Am I missing something? Thanks :)