How to backup and restore AWS Lightsail instance using snapshot?

How to backup and restore AWS Lightsail instance using snapshot?

How to backup and restore AWS Lightsail instance using snapshot?

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

A disaster can happen anytime and having a good backup is essential to recover from a disaster and your AWS Lightsail instance is no exception. In AWS Lightsail, you can take a snapshot (backup) of your Lightsail instance and use that snapshot to restore the Lightsail instance in case of a disaster. AWS Lightsail also provide options to automate your backup.

How to backup and restore AWS Lightsail instance using snapshot?

Prerequisites:

Step 1: Login to AWS management console.

https://aws.amazon.com/

Step 2: Navigate to Lightsail console.

How to backup and restore AWS Lightsail instance using snapshot?

Step 3: Select your Lightsail instance and click “Snapshot” tab.

You can either manually take a snapshot or enable automatic snapshots of your Lightsail instance. In case of automatic snapshot, AWS will take a snapshot of your Lightsail daily once and will retain last seven days of snapshot. In case of manual snapshot, it can be taken at any time.

Note: There is additional cost associated with snapshot. Please refer the AWS Lightsail pricing

Enable automatic snapshot for your Lightsail instance:

Click on radio button to enable automatic snapshots. Select the checkbox and click “Yes, Enable” to enable automatic snapshots.

How to backup and restore AWS Lightsail instance using snapshot?

Take an ad-hoc backup (manual snapshot) of your AWS Lightsail instance:

Click on “Create snapshot” under “Manual snapshots”.

How to backup and restore AWS Lightsail instance using snapshot?

Provide a name and click “Create”.

How to backup and restore AWS Lightsail instance using snapshot?

Backup completed successfully.

How to backup and restore AWS Lightsail instance using snapshot?

Next, we are going to restore this backup.

Step 4: Restore a snapshot for AWS Lightsail instance.

Click on the snapshot option that you want to restore and click “Create new instance”.

How to backup and restore AWS Lightsail instance using snapshot?

Note: You need to create a new Lightsail instance using the snapshot and then switch your static public IP address to the new instance. If your website is in production make sure your existing instance has static public IP address, else you need update the DNS “A” record with the new IP address which involved downtime.

Note: This blog post assume that you are running the Lightsail instance on default configuration. If you have made any custom configuration like using a load balancer or hosted zone then there are additional steps you have to follow to restore the Lightsail instance.

The below steps also applies if you want to do the following with your Lightsail instance:

  1. Change the AWS Lightsail instance location
  2. Change the AWS Lightsail instance SSH keys
  3. Change the AWS Lightsail instance type

Provide a name to the new Lightsail instance and click “Create”.

How to backup and restore AWS Lightsail instance using snapshot?

How to backup and restore AWS Lightsail instance using snapshot?

Once the new instance is up and running, click on the “pin” icon next to public IP address of your onl instance.

How to backup and restore AWS Lightsail instance using snapshot?

Click on “Detach” to detach the static public IP address from the old instance.

How to backup and restore AWS Lightsail instance using snapshot?

How to backup and restore AWS Lightsail instance using snapshot?

Now from the same page, select your new Lightsail instance and click “Attach” to attach the public IP address to your new Lightsail instance.

How to backup and restore AWS Lightsail instance using snapshot?

We have successfully restored our Lightsail instance, check your Lighsail application if it’s working fine. If everything is working as expected, delete the old Lightsail instance and optionally the manual snapshot taken previously.

How to backup and restore AWS Lightsail instance using snapshot?

How to backup and restore AWS Lightsail instance using snapshot?

Hope you have enjoyed this article. To get more details on Lightsail, please refer below official documentation.

https://lightsail.aws.amazon.com/ls/docs/en_us/all

Leave a Reply

Close Menu