Restoring an RDS Database


Course Introduction
RDS vs. EC2
RDS vs. EC2
DynamoDB Accelerator

The course is part of this learning path

Start course
4h 21m

This section of the AWS Certified Solutions Architect - Professional learning path introduces you to the AWS database services relevant to the SAP-C02 exam. We then understand the service options available and learn how to select and apply AWS database services to meet specific design scenarios relevant to the AWS Certified Solutions Architect - Professional exam. 

Want more? Try a Lab Playground or do a Lab Challenge

Learning Objectives

  • Understand the various database services that can be used when building cloud solutions on AWS
  • Learn how to build databases using Amazon RDS, DynamoDB, Redshift, DocumentDB, Keyspaces, and QLDB
  • Learn how to create ElastiCache and Neptune clusters
  • Understand which AWS database service to choose based on your requirements
  • Discover how to use automation to deploy databases in AWS
  • Learn about data lakes and how to build a data lake in AWS

Hello, and welcome to this lecture, which is going to look at how to restore a database from an existing backup. Firstly, I want to look at how to restore a database from an automatic backup to a particular point in time.

As a part of the backup process when automatic backups are in place, RDS backs up the transaction logs to Amazon S3 every five minutes. So this is something you need to bear in mind when you're performing a restore, especially if you need to restore from five minutes or less from that point in time.

You can check the latest restore time possible from either the AWS management console or by running the following command line from the AWS CLI, replacing the text in red with the name of your database. This will return data for your database including an entry similar to the following. The last restore time shows you the latest point at which you can restore from.

So for example, assume the time was 15:04 and you wanted to restore from 15:02, but the latest restore time was showing at 15:00, then the latest point you could restore up to would be 15:00. You'd have to wait another minute until 15:05, which would then become the latest restore time, five minutes later from the previous time. At this point, you would then be able to restore anytime up until 15:05.

When you perform a restore, it restores the entire instance and so it will be restored to a brand new instance. If restoring a SQL server database instance, every database on that instance will be restored to within one second of all of the databases on that same instance.

If restoring an Oracle database instance, you can, if required to select a new license model and database name for the new instance. When restoring a database from a manual backup, or snapshot, there is no option to perform a point in time when you restore.

As previously mentioned, when a snapshot backup is taken, the backup is taken at that point in time and stored on Amazon S3 and can only be restored back to a new database instance at that point in time in which the backup was taken. If required, then during the restore process, you can actually restore to a different storage type from the source database.

For example, if a backup was taken of a database that had general purpose SSD storage and was then restored to a new database instance, you could select to have it restored to provisioned IOPS instead. However, due to additional processing time, the restore will take longer than simply restoring to the same storage type used from the backup.

When you are restoring your manual snapshot, you have the option of changing both the parameter group and the security group. Now AWS recommends however that you leave both the parameter group and the security setting the same as the snapshot.

Let me now provide a quick demonstration of how to perform a manual restore from an existing manual snapshot. Okay, so I'm back in the Amazon RDS dashboard of the management console. And as we can see, we have our database here that we backed up in a previous lecture. But what I want to do now is to restore from an existing backup. So if I go down to snapshots, we can see the two snapshots that we created earlier.

Now to restore from one of these snapshots, all I need to do is to select the snapshot that I want to restore from, go across to actions and click restore snapshot. Now here at the top, it says you are creating a new database instance from a source database instance at a specified time and this new database instance will have the default database security group and database parameter groups.

Now because we're creating a new instance, we can specify different options. So again, we have the engine and here we can add a new identifier. So let's call this instance database 2. We can select a VPC, again with additional creativity configurations with regards to different subnet groups, etc. You can change the database instance size when you restore, so that can be a different database instance size from the source database that you originally took the backup from. You can change the storage type.

Again, you have options for availability and durability. If you want to implement a multi-hazy deployment with this restore and finally your database authentication and encryption options. If you needed to change the parameter group and the option group, then you can do so under the additional configuration, I'm just going to leave that as the default.

Just before we restore this database, I'm just going to change the size and then I shall click on restore database instance. Now as you can see here, here's the new database instance that I'm restoring. We could see the instance size and also the status is that it's creating. So that would just take a couple of minutes there so for that to become available. Okay and now you can see that that's finished creating and the status is now available. And if we select the instance, anyone can see the details of the instance such as the endpoint and port, etc, along with its availability zone subnets and security groups.

So as you can see, it's very quick and easy to restore from an existing manual snapshot.


Course Introduction - RDS Backup Capabilities - Copying & Sharing RDS Snapshots - Amazon DynamoDB Backup Capabilities - Restoring an Amazon DynamoDB Database - Course Summary

About the Author
Learning Paths

Danny has over 20 years of IT experience as a software developer, cloud engineer, and technical trainer. After attending a conference on cloud computing in 2009, he knew he wanted to build his career around what was still a very new, emerging technology at the time — and share this transformational knowledge with others. He has spoken to IT professional audiences at local, regional, and national user groups and conferences. He has delivered in-person classroom and virtual training, interactive webinars, and authored video training courses covering many different technologies, including Amazon Web Services. He currently has six active AWS certifications, including certifications at the Professional and Specialty level.