The single most important part of backups are not backups. The single most important part of backups are restores. It doesn’t matter a lick if you have 100, flawless backups of your database if you can’t restore one of them. So, let’s get started and talk about how perform an RDS restore.
I’m going to use the portal because I like how GUIs allow me to easily illustrate what I’m doing. However, I’ll probably do another post soon on how to use the command line to do this. That is the better approach in most cases.
If you connect up to a database within RDS, you get a menu, Actions:
Right there, near the bottom is what we’re looking for, Restore to point in time.
Clicking on this opens a whole new window, and some interesting decisions. Let’s take a look at the top of the window first:
This is our first, and possibly most important choice. The default is to go to the latest possible restore point. As I type this, that’s about six minutes in the past. That’s just slightly beyond the five minute window for log backups and probably explainable by the fact that there’s just no guarantee that you’ll never lose data. I can also specify a custom date and time for my RDS restore:
That’s it. I’m now ready to do a point in time restore. Honestly, it’s that simple.
Below the screen I’ve been showing you are ALL the options for defining this database. Why? One simple reason. You can’t overwrite the existing database. You must restore to a new instance.
Look. Every possible default is chosen for you. You restore to the new instance. Make sure it’s online. Rename the old instance. Rename the new one to the old one. You’re done. Yes, a couple of extra steps. Did you forget how easy the initial couple of steps were?
If you need to, you can adjust settings on the instance as you restore. This also makes it easy to create copies of a database.
Personally, I love how simple it is to do an RDS restore. Yes, I hear the screams, you can’t just overwrite what’s there. I get it. The deal with Platform is a Service is simple. You get a lot of things. You have a surrender a few. Honestly, seems like a good deal to me. Heck, I’ve got an article coming out shortly on restoring to a point in time within PosgreSQL. It is anything but simple & straight forward. However, running my PostgreSQL databases here, it actually is. Very simple.