Thursday, October 26, 2017

Downloading or Backing up an Image or Drive from AWS

So we have an  EC2 instance on AWS.  But we need to terminate it as the project has to give way to something urgent and therefore not on foreseeable future will it be used. So instead of accruing cost, (as an image cost something if its in AWS although it is not being used), we decided to download the image or drive directly on our drive and store it.

This is what we did.


  1. Create a snapshot of the existing image you want to download in AWS. 
  2. From that snapshot, create an image.
  3. Once the image is available, add that image as part of the EC2 Instance you wish to download.
  4. Create another image. Make sure this is bigger than the image that you want to backup. Basically this will hold the image backup
  5. Mount it as part of the EC2 Instance.


For this, this is what I have :




here,

  • /dev/sda1 is the source or what I will backup
  • /dev/sdf is a copy of /dev/sda1
  • /dev/sdg will contain the backup.

To get the available mountpoints that can be mounted :

execute :



As you can see..  /dev/sdf  (which is xvdf) is mounted as :



For /dev/sdg, the mountpoint is xvdg.


Since this is a new image, do the following commands :




Then mount  (make sure that the folder /mnt/image is available)\:




Afterwards, create an image :





Once created, go to /mnt/image and do a tar/gz. This is to compress it.





After which, you can now do an SCP to the machine and download the file.


20 comments:

  1. Replies
    1. Amazing Article, thank you!. I just wish to give you a big thumbs up for the excellent post. Kindly keep updating your blog. Java Developer is a dream career for IT students.To start wonderful Career to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India .

      or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

      Delete
  2. Those guidelines additionally worked to become a good way to
    recognize that other people online have the identical fervor like mine
    to grasp great deal more around this condition.


    AWS Training in Bangalore


    AWS Training in Bangalore

    ReplyDelete
  3. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    hadoop-training-institute-in-chennai

    ReplyDelete
  4. Appreciating the persistence you put into your blog and detailed information you provide.

    It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.

    AWS Training in Chennai

    ReplyDelete
  5. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    amazon-web-services-training-institute-in-chennai

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.

    Best Java Training Institute Chennai

    Amazon Web Services Training in Chennai

    ReplyDelete
  8. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
    Best selenium training Institute in chennai

    ReplyDelete
  9. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
    datascience training in chennai

    ReplyDelete
  10. All your hard work is much appreciated. Thanks for shraing.

    Aws Training in Hyderabad

    ReplyDelete
  11. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
    aws training in chennai
    Advanced aws training in chennai

    ReplyDelete
  12. Thank you for sharing wonderful information with us to get some idea about that content.
    Aws Training in Chennai

    ReplyDelete
  13. Thanks for sharing information. Your web-site is very cool. I am impressed by the details that you have on this blog. It reveals how nicely you perceive this subject

    aws training in chennai

    digital marketing training in chennai

    ReplyDelete
  14. Thanks for sharing the information, Salesforce experts a a lot of openings in multi-level companies, for more information n
    Salesforce Training in Hyderabad
    Salesforce Online Training in Bangalore
    Best Salesforce online Training

    ReplyDelete
  15. AWS Training in Bangalore - Live Online & Classroom
    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.


    IOT Training in Bangalore - Live Online & Classroom
    IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. You can find the best AWS Training in Chennai for learning. AWS Certification is fast becoming the must have certificate for any IT professional working with AWS. No specific programming knowledge is needed (though knowing a language would be advantageous) and no prior AWS experience required.you will be in high demand by many employers and will command a superior salary.

    ReplyDelete