# Amazon RDS

How to back up and restore AWS RDS managed databases via SimpleBackups.

Amazon RDS is a managed relational database service that supports MySQL, PostgreSQL, Aurora MySQL, and Aurora PostgreSQL. Connecting it to SimpleBackups lets you store portable backup files in your own storage with flexible retention schedules, complementing RDS's native snapshot functionality. This guide covers both manual connection and automatic API-based setup.

## Connecting your database

### Step 1: Open your RDS database

From the AWS console, navigate to **Databases** under RDS.

![AWS RDS database list screen](https://simplebackups.com/docs/docs-assets/media-helpkit-co/a22f8f7e7a20d7220dc2.png)

### Step 2: Configure IP filtering

1. Select the database you want to back up.
2. Ensure that **Publicly accessible** is set to **Yes**. If not, use **Modify** to change it.
3. Open the default **VPC security groups** and add the [SimpleBackups IP addresses](https://simplebackups.com/docs/help-tips-and-troubleshooting/connecting-a-server/simplebackups-ip-addresses-firewall) to the **Inbound Rules**.

![RDS VPC security group configuration screen](https://simplebackups.com/docs/docs-assets/media-helpkit-co/597a67374349e256bd93.png)

![RDS inbound rules editor](https://simplebackups.com/docs/docs-assets/media-helpkit-co/17943b1bec06bcca1c25.png)

![RDS inbound rule type selection](https://simplebackups.com/docs/docs-assets/media-helpkit-co/d893733ba80e347d3d62.png)

![RDS inbound rule saved](https://simplebackups.com/docs/docs-assets/media-helpkit-co/b64b10d3ca4fa86c49ee.png)

### Step 3: Copy your connection credentials

1. Navigate to the **Connectivity & security** section and copy the **Endpoint** and **Port**.

![RDS connectivity and security tab showing endpoint and port](https://simplebackups.com/docs/docs-assets/media-helpkit-co/0023e6fa299f4e292c40.png)

2. Navigate to the **Configuration** section and copy the **Master username**.

![RDS configuration tab showing master username](https://simplebackups.com/docs/docs-assets/media-helpkit-co/2fafbdac353f8f3cb497.png)

### Step 4: Set up a database backup in SimpleBackups

Navigate to creating a new database backup and choose **Serverless**. You can connect using either manual form fill or automatic import:

**Manual connection**

Select the database **Type** and fill in the connection details, or click **Paste connection string** and enter the full connection URI.

![SimpleBackups database connection form with manual fields](https://simplebackups.com/docs/docs-assets/media-helpkit-co/0b357ba025ab6f84f770.png)

**Automatic import via DBaaS provider**

1. Click **Connect your DBaaS Provider**.
2. Choose an **Amazon RDS** provider.
3. Select the managed database you want to back up.
4. Click **Load**.

![SimpleBackups DBaaS provider selection for Amazon RDS](https://simplebackups.com/docs/docs-assets/media-helpkit-co/eb386756d8b3e0d2f324.png)

### Step 5: Validate and activate

Click **Validate connection** to confirm that SimpleBackups can reach your database. Once validated, configure your schedule and activate the backup.

## Restoring a backup

To restore a backup, navigate to your backup page and open the **Logs** tab. Click the detail icon on the backup you want to restore from, then open the **Restore** tab. Generate a download link and copy it.

![Amazon RDS backup logs tab](https://simplebackups.com/docs/docs-assets/media-helpkit-co/468943256706a9808233.png)

![Amazon RDS backup detail view](https://simplebackups.com/docs/docs-assets/media-helpkit-co/d86f05983033eff59ab6.png)

![Amazon RDS restore tab with download link](https://simplebackups.com/docs/docs-assets/media-helpkit-co/ae0d8d66bdfc50562440.png)

Run the following command to download and decompress your backup (replace the URL with your signed download link):

```bash
wget -O - "<signed-download-url>" | gunzip -c > backup.pgsql
```

Then restore using `pg_restore`, replacing `<your-database-uri>` with your full database connection string:

```bash
pg_restore -d "<your-database-uri>" ./backup.pgsql
```

**Tip:**
Use the latest version of `pg_restore` to avoid compatibility issues during restore.
