Solved

Amazon EC2 Backup Strategy

Posted on 2009-04-04
5
2,859 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
ID: 24067910
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
ID: 24069483
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
ID: 24070202
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 33

Assisted Solution

by:shalomc
shalomc earned 250 total points
ID: 24213905
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 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

17 Experts available now in Live!

Get 1:1 Help Now