What is RDS Instance?

Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the AWS Cloud.

Where RDS Snapshots will be stored?

Be default, RDS will create and store automated backups securely in S3 Bucket as per the retention period.

Also you can create a manual snapshot of the DB instance which are kept until you explicitly delete it.

What can you do with Snapshots?

You can create a new DB instances using the snapshot.

You can migrate RDS instance to another region using the DB snapshots.

Creating a DB Snaphot:

Amazon RDS creates a storage volume snapshot of the DB instance, which back up the entire database not just the single database within.

When you create a DB snapshot you need to identify which DB instance you’re going to backup , and you have to give a unique name to the snapshot for easy identification.

The amount of time for creating DB snapshot depends on the Instance type and the Storage used.

Let’s Login to RDS Console and create your first DB snapshot:

https://ap-southeast-1.console.aws.amazon.com/rds/home?region=ap-southeast-1#

Assuming that you have a running DB instance in place. If you dont have one, create a RDS instance using the below link,

Create RDS Inistance from Console

Create RDS Instance using Terraform

Once the DB instance is ready, Let jump into creating the snapshot for this DB instance.

Creating a manual snapshot:

In the navigation pane, Choose Databases,

In the list of databases, Choose the DB instance from which you want to create a snapshot.

RDS

For Actions, choose Take snapshot,

RDS

Give a name for the snapshot, Click Take snapshot

RDS

It will take you to the Snapshot page, And you can the snapshot creation progress.

RDS

Now, You have created your first manual snapshot for the DB instance.

Creating snapshots automatically:

Choose the DB instance for which you want to create snapshots automatically.

Choose modify, Scroll down and you should see Backup

Here, We are going to mention a Backup window, So that RDS will take a snapshot for this DB instance automatically at the mentioned time.

Backup retention period : The number of days for which the automated snapshots are retained.

If you set to 0 days, the automated snapshot option will be disabled.

RDS

Now , We know how to configure RDS instance to create snapshots automatically.

Restoring from a DB snapshot:

Assuming that we have a snapshot in place.

Go to Snapshots pane of the RDS console:

https://ap-southeast-1.console.aws.amazon.com/rds/home?region=ap-southeast-1#db-snapshots:

RDS

Choose the Snapshot , For Actions , Click Restore snapshot

This will create a new DB instance with the same configuration of the DB instance from which you have created a snapshot.

RDS

If required, You can change the DB instance class, VPC security groups , Storage type, Network and Security, But the Data and the DB credentials will remain the same as of the DB instance from which the snapshot was taken.

Give a unique name for the new DB instance

RDS
RDS

 

RDS
RDS

Once you have modified the DB configurations If required , Choose Restore DB Snapshot.

RDS

Now you should be able to create a new DB instance , with same data and configurations from the existing DB snapshots.

Hope you have liked it, Check out my other blogs related to DEVOPS / AWS.