Snapshot and Restore of Lightsail Instance to Lightsail/EC2

Taking common backup/snapshots of a manufacturing utility is necessary. It is likely one of the principal necessities of a catastrophe restoration(DR) plan. However snapshots will not be just for DR, you should utilize them to maneuver/clone situations to totally different areas or availability zone(AZ). Perhaps transfer to the next spec occasion. Or perhaps you need to transfer to Amazon EC2 altogether.



Conditions

You simply want an current Amazon Lightsail occasion. Don’t fret if you do not have one, comply with find out how to Deploy WordPress App to Amazon Lightsail.



Take Snapshot (Backup)

  1. Click on on the occasion title you need to take a snapshot. All the situations are listed underneath the Cases tab of the house web page.

  2. Go to the Snapshots tab of your occasion web page.
    Amazon Lightsail Instance Snapshot
    (B) We’re going to create a guide snapshot. This one will take a snapshot immediately.
    (C) Optionally, you may arrange an computerized snapshot too. It’ll take day by day snapshots.

    ⚠️ **For manufacturing occasion, all the time arrange an computerized snapshot. **

  3. Give it a reputation and click on Create.
    Amazon Lightsail Instance Snapshot
    It’ll take a while if that is the primary snapshot of the occasion, dimension is one other issue. Subsequent snapshots are quicker, because it takes incremental backups, solely adjustments from the final snapshot.

  4. Upon completion, it can appear like this:
    Amazon Lightsail Instance Snapshot

  5. You will discover the entire snapshots within the Snapshots tab of the homepage. I’ve only one:
    Amazon Lightsail all snapshots



Restore to new Amazon Lightsail occasion

  1. Click on on these 👇 three dots:
    Lightsail Snapshot restore menu

  2. Click on on Create new occasion from this menu:
    Lightsail Snapshot restore menu

    ℹ️ You possibly can click on on the second merchandise, Copy to a different Area to actually copy to a different area and restore to a brand new occasion there. Snapshot saved in an S3 bucket in the identical area the place the occasion launched. You possibly can’t entry the S3 bucket because it’s managed by AWS. To revive a snapshot to a brand new occasion in one other area, you need to copy it first.

  3. The web page seems to be acquainted, proper? It is the identical create occasion web page.
    Create an instance from a snapshot in Amazon Lightsail
    (A) You possibly can change the supply zone(AZ) if you would like. It is nice in case you are utilizing a number of situations for horizontal scaling, provides excessive availability(HA).
    (B) Select an occasion the identical dimension or bigger than the supply. Select bigger for vertical scaling. For those who want a bigger occasion than you initially have, that is the way in which.
    (C) Give it a reputation, and
    (D) Click on the Create occasion button from the underside of the web page.

Wait a second, perhaps a couple of minutes. Congratulations 🎉 you simply restored your occasion.



Copy to a different Area

Snapshot saved in an S3 bucket in the identical area the place the occasion launched. You possibly can’t entry the S3 bucket because it’s managed by AWS. To revive a snapshot to a brand new occasion in one other area, you need to copy it first. Let’s copy it to a different area.

  1. Go to the Snapshots tab of the homepage. Discover your occasion and snapshot. Click on the three dots. After which click on Copy to a different Area:
    Copy snapshot to another Region in Amazon Lightsail

  2. (A) Select the area you need to copy the snapshot, (B) give it a reputation, and (C) click on the Copy snapshot button from the underside of the web page.
    Copy snapshot to another Region in Amazon Lightsail

  3. It’ll take a couple of minutes to repeat the snapshot.



Restore/Export to Amazon EC2 occasion

  1. Click on three dots from the snapshot menu you need to restore to EC2 and click on the Export to Amazon EC2 menu merchandise
    Export to Amazon EC2

  2. Click on the Sure, proceed button within the popup. Click on Acknowledge within the subsequent popup.
    Export to Amazon EC2

    ⚠️ In case you are not within the free-tier or cross the free-tier restrict, you could get charged for this. In case you are unsure, do not do it. Simply comply with my demo.

  3. You will notice a process working like this ↓. Await some time to complete. A small snapshot would not take a lot time.
    Export to Amazon EC2

  4. After the copy process is accomplished, go to Snapshots of EC2 Management Console. Select the right area. You must see your snapshot there.

  5. Choose the snapshot and click on the Create picture from snapshot from the Actions menu
    Snapshots on EC2 Management Console

  6. Give the title of the picture and click on the Create picture button from the underside of the web page
    Snapshots on EC2 Management Console

  7. Now go to AMIs page of EC2 Management Console. Select the right area, N. Virginia (us-east-1) in my case. You must see all your AMIs.

  8. Choose the AMIs you simply created and click on the Lunch Occasion from AMI button within the high proper nook.
    CleanShot 2022-05-12 at 19.34.19@2x.png

  9. You will notice a standard EC2 Lunch web page:
    CleanShot 2022-05-12 at 19.44.03@2x.png
    (A) Give your occasion a reputation. (B) Select an occasion kind, for my case, it is free tier eligible t2.micro. (C) Select current key pair or create a brand new one. You want it to log in by way of SSH. (D) Verify the ports you need to open, in my case I chosen all of them.

Now, click on the Lunch occasion button from the suitable sidebar. Await some time to occasion state to turn out to be Working and Standing test 2/2 checks handed.

  1. You will notice the EC2 Cases web page like this:
    CleanShot 2022-05-12 at 19.56.19@2x.png
    Choose the occasion. Copy the general public IP tackle and check out it within the browser. You must see the identical web page as Amazon Lightsail occasion.

ℹ️ Guide snapshots is not going to be deleted even should you delete the occasion. So, remember to delete pointless snapshots to avoid wasting payments.



Conclusion

Hope you loved this text. Ask your questions within the remark. Subscribe to my e-newsletter to get weekly updates.

Add a Comment

Your email address will not be published. Required fields are marked *