Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2890
  • Last Modified:

Amazon EC2 Backup Strategy

Experts,
We are moving our Dotnetnuke websites and applications to Amazon EC2.
1. I'd like to know the best backup strategy to put in place in the unlikely event the Instance fails and we lose all of our data.
2. If an instance fails the Elastic IP is de-allocated and the DNS will be pointing to an invalid server. How do we resolve this? Is there a Dynamic DNS solution recommended?

Environment:
Windows Server 2003 x64
SQL Server 2008
Dotnetnuke 4.90


Thanks
0
itproject
Asked:
itproject
  • 2
2 Solutions
 
EspetoCommented:
1. You can use Elastic Block Store for you data or can create backup to S3 Amazon service.
2. This can resolve heartbeat and simple bash scripts. Or script can pin instance and allocate EIP to other instance via amazon api tools.
0
 
itprojectAuthor Commented:
Thanks, I've read similar high level approaches on Amazon aws and various forums but there aren't any detailed guides on "how" to implement this.

Do you have any step by step guides or example scripts?

Do I store the website files, SQL server data files and binaries on EBS  ?

How do you automate the EBS snapshot to S3 and setup the dynamic DNS heartbeat scripts to allocate a new IP when one is lost so there is the least amount of outage time ?

0
 
EspetoCommented:
Look http://developer.amazonwebservices.com/connect/entry!default.jspa?categoryID=112&externalID=1663&fromSearchPage=true
It's good resolve for snapshot MySQL and xfs.

For second question:
When an instance start up, you have it execute an Associate Address call that maps the elastic IP address that you own to your instance's current private address.

Use:

#ec2-describe-addresses
 ADDRESS 75.101.157.145
 ADDRESS 75.101.155.119
#ec2-describe-instance
RESERVATION      r-ae33c2c7      924417782495    default
 INSTANCE         i-b2e019da      ami-2bb65342    ec2-72-44-33-67.compute-1.amazonaws.com  ip-10-251-71-165.ec2.internal   running  gsg-keypair     0               m1.small        2008-03-03T23:09:09+0000       us-east-1a
 INSTANCE         i-b2e019db      ami-2bb65342    ec2-67-202-3-83.compute-1.amazonaws.com  ip-10-251-47-36.ec2.internal    running  gsg-keypair     1               m1.small        2008-03-03T23:09:09+0000       us-east-1a
#ec2-associate-address -i i-b2e019da 75.101.157.145
0
 
shalomcCTOCommented:
you have to deal with 2 issues: availability of application server and availability of data.
For the application server, create a ready to deploy, up to date  AMI. You can then have it up and running in minutes. the AMI will contain everything except the dynamic data, in your case the sql data.

I assume that you know how to find the official docs, so I won't direct you there ;)

For the data, use EBS. running SQL instance on EBS issues:
http://developer.amazonwebservices.com/connect/thread.jspa?messageID=112585𛟉

For backup, create a snapshot of the EBS volume to S3 with the ec2-create-snapshot command. Read this thread about recommendations (hint: use REST tools rather than java)
http://developer.amazonwebservices.com/connect/thread.jspa?messageID=102822𙆦

You may have additional non-database data like files and images.
These can be either kept on EBS volume, or synced to S3.
You can use jets3t that works like rsync to keep files in sync with a S3 backup.
http://shalomcarmel.blogspot.com/2009/01/synchronize-iseries-files-with-amazon.html

To sum things up:
* Your SQL server's data is stored on EBS
* You have a private AMI with all of the necessary software preinstalled.
* At startup, your AMI connects to EBS, and allocates the elastic IP to itself.
* If you have non-database dynamic data, either store it on EBS or sync it to S3, and then resync it to the fresh instance at startup

There are also commercial services that you may look at, like Rightscale.

ShalomC
0

Featured Post

The Firewall Audit Checklist

Preparing for a firewall audit today is almost impossible.
AlgoSec, together with some of the largest global organizations and auditors, has created a checklist to follow when preparing for your firewall audit. Simplify risk mitigation while staying compliant all of the time!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now