Solved

Amazon EC2 Backup Strategy

Posted on 2009-04-04
5
2,850 Views
Last Modified: 2014-11-12
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
Comment
Question by:itproject
  • 2
5 Comments
 
LVL 1

Expert Comment

by:Espeto
Comment Utility
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
 

Author Comment

by:itproject
Comment Utility
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
 
LVL 1

Accepted Solution

by:
Espeto earned 250 total points
Comment Utility
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
 
LVL 32

Assisted Solution

by:shalomc
shalomc earned 250 total points
Comment Utility
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&#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&#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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now