Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6014235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:39:45+00:00 2026-05-23T02:39:45+00:00

I have an EBS backed EC2 running instance. The EBS store holds a database.

  • 0

I have an EBS backed EC2 running instance. The EBS store holds a database. I would like to create an AMI from this. Can someone please provide guidelines?

  1. Do I have to shut down MySQL?
  2. Will my AMI attempt to connect to the same EBS store?! (disaster)
  3. Will creating the AMI automatically snapshot my EBS volume and create a copy? (hoping it’s this one)

Thanks for your patience through a long question. I recognize there’s similar information out there, but nothing really addresses what may go wrong.

This SO question:

http://stackoverflow.com/questions/4475532/creating-an-ec2-ami-with-an-ebs-backed-instance-is-it-possible

is specific to ElasticFox and I’m not using any tools (prefer command line). I don’t believe the question is answered either.

This blog:

http://instantbadger.blogspot.com/2009/09/how-to-create-and-save-ami-image-from.html

while instructive about creating an AMI, does not mention EBS at all and I’m a little worried about all that data.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:39:46+00:00Added an answer on May 23, 2026 at 2:39 am

    Before going to your questions I would suggest that you back up your MySQL database to a file which is not stored as a snapshot or in an EBS before you start creating the image. (And of course test that you can restore it to somewhere else than your production system.)

    I use:

    mysqldump --add-drop-table -u root -p databasename > database.sql
    

    to backup and:

    mysql -u root -p databasename < database.sql
    

    to restore.

    1. No, you do not have to shut down MySQL, but you have to prevent writes to the database while create the AMI.
    2. No, The creation of a AMI also creates a new snapshot of your EBS volume (with the content as it was at image creation time).
    3. yes, see 2

    A bit more info:
    I prefer to shut down the database when possible when snapshoting or creating images. That said I am not by any mean an MySQL expert, but here is some guidance from http://aws.amazon.com/articles/1663?_encoding=UTF8&jiveRedirect=1

    Start a MySQL session on the instance, using the password you set above.

    mysql -u root -p
    

    In the mysql session, flush the tables to disk and acquire a lock. Flush the file system to disk and freeze it. Do not exit the MySQL session or you will lose the lock and snapshot potentially inconsistent database files!

    FLUSH TABLES WITH READ LOCK;
    SHOW MASTER STATUS;
    SYSTEM sudo xfs_freeze -f /vol
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have postgres database running on Amazon EC2 instance. I have few tablespaces created
I'm using Amazon EC2 with a Fedora 8 Core AMI. I have an EBS
I'm using RabbitMQ on an EC2 instance and I have the Mnesia tables on
have such zend query: $select = $this->_table ->select() ->where('title LIKE ?', '%'.$searchWord.'%') ->where('description LIKE
I have a snippet to create a 'Like' button for our news site: <iframe
Have you managed to get Aptana Studio debugging to work? I tried following this,
Have you refactored from an ActiveRecord to a DataMapper pattern? What conditions prompted the
I'm building some AMIs from one of the basic ones on EC2. One of
I am migrating my Java,Tomcat, Mysql server to AWS EC2. I have already attached
I have created an amazon EBS volume using my amazon credentials. My customer gave

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.