

# Managing manual backups
<a name="USER_ManagingManualBackups"></a>

This section shows how to manage manual backups for DB instances and DB clusters.

For information about creating a DB snapshot for a Single-AZ DB instance, see [Creating a DB snapshot for a Single-AZ DB instance for Amazon RDS](USER_CreateSnapshot.md).

For information about creating a DB snapshot for a Multi-AZ DB cluster, see [Creating a Multi-AZ DB cluster snapshot for Amazon RDS](USER_CreateMultiAZDBClusterSnapshot.md).

For information about deleting a DB snapshot, see [Deleting a DB snapshot for Amazon RDS](USER_DeleteSnapshot.md).

# Creating a DB snapshot for a Single-AZ DB instance for Amazon RDS
<a name="USER_CreateSnapshot"></a>

Amazon RDS creates a storage volume snapshot of your DB instance, backing up the entire DB instance and not just individual databases. Creating this DB snapshot on a Single-AZ DB instance results in a brief I/O suspension that can last from a few seconds to a few minutes, depending on the size and class of your DB instance. For MariaDB, MySQL, Oracle, and PostgreSQL, I/O activity is not suspended on your primary during backup for Multi-AZ deployments, because the backup is taken from the standby. For SQL Server, I/O activity is suspended briefly during backup for Multi-AZ deployments.

When you create a DB snapshot, you need to identify which DB instance you are going to back up, and then give your DB snapshot a name so you can restore from it later. The amount of time it takes to create a snapshot varies with the size of your databases. Since the snapshot includes the entire storage volume, the size of files, such as temporary files, also affects the amount of time it takes to create the snapshot.

**Note**  
Your DB instance must be in the `available` state to take a DB snapshot.  
For PostgreSQL DB instances, data in unlogged tables might not be restored from snapshots. For more information, see [Best practices for working with PostgreSQL](CHAP_BestPractices.md#CHAP_BestPractices.PostgreSQL).

Unlike automated backups, manual snapshots aren't subject to the backup retention period. Snapshots don't expire.

For very long-term backups of MariaDB, MySQL, and PostgreSQL data, we recommend exporting snapshot data to Amazon S3. If the major version of your DB engine is no longer supported, you can't restore to that version from a snapshot. For more information, see [Exporting DB snapshot data to Amazon S3 for Amazon RDS](USER_ExportSnapshot.md).

You can create a DB snapshot using the AWS Management Console, the AWS CLI, or the RDS API.

## Console
<a name="USER_CreateSnapshot.CON"></a>

**To create a DB snapshot**

1. Sign in to the AWS Management Console and open the Amazon RDS console at [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/).

1. In the navigation pane, choose **Snapshots**.

   The **Manual snapshots** list appears.

1. Choose **Take snapshot**.

   The **Take DB snapshot** window appears.  
![\[Take DB snapshot.\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/take_db_snapshot.png)

1. Choose the **DB instance** for which you want to take a snapshot.

1. Enter the **Snapshot name**.

1. Choose **Take snapshot**.

The **Manual snapshots** list appears, with the new DB snapshot's status shown as `Creating`. After its status is `Available`, you can see its creation time.

## AWS CLI
<a name="USER_CreateSnapshot.CLI"></a>

When you create a DB snapshot using the AWS CLI, you need to identify which DB instance you are going to back up, and then give your DB snapshot a name so you can restore from it later. You can do this by using the AWS CLI [https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-snapshot.html](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-snapshot.html) command with the following parameters:
+ `--db-instance-identifier`
+ `--db-snapshot-identifier`

In this example, you create a DB snapshot called *mydbsnapshot* for a DB instance called *mydbinstance*.

**Example**  
For Linux, macOS, or Unix:  

```
1. aws rds create-db-snapshot \
2.     --db-instance-identifier mydbinstance \
3.     --db-snapshot-identifier mydbsnapshot
```
For Windows:  

```
1. aws rds create-db-snapshot ^
2.     --db-instance-identifier mydbinstance ^
3.     --db-snapshot-identifier mydbsnapshot
```

## RDS API
<a name="USER_CreateSnapshot.API"></a>

When you create a DB snapshot using the Amazon RDS API, you need to identify which DB instance you are going to back up, and then give your DB snapshot a name so you can restore from it later. You can do this by using the Amazon RDS API [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBSnapshot.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBSnapshot.html) command with the following parameters:
+ `DBInstanceIdentifier`
+ `DBSnapshotIdentifier`

# Creating a Multi-AZ DB cluster snapshot for Amazon RDS
<a name="USER_CreateMultiAZDBClusterSnapshot"></a>

When you create a Multi-AZ DB cluster snapshot, make sure to identify which Multi-AZ DB cluster you are going to back up, and then give your DB cluster snapshot a name so you can restore from it later. You can also share a Multi-AZ DB cluster snapshot. For instructions, see [Sharing a DB snapshot for Amazon RDS](USER_ShareSnapshot.md).

You can create a Multi-AZ DB cluster snapshot using the AWS Management Console, the AWS CLI, or the RDS API.

For very long-term backups, we recommend exporting snapshot data to Amazon S3. If the major version of your DB engine is no longer supported, you can't restore to that version from a snapshot. For more information, see [Exporting DB snapshot data to Amazon S3 for Amazon RDS](USER_ExportSnapshot.md).

## Console
<a name="USER_CreateMultiAZDBClusterSnapshot.CON"></a>

**To create a DB cluster snapshot**

1. Sign in to the AWS Management Console and open the Amazon RDS console at [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/).

1. In the navigation pane, choose **Databases**.

1. In the list, choose the Multi-AZ DB cluster for which you want to take a snapshot.

1. For **Actions**, choose **Take snapshot**.

   The **Take DB snapshot** window appears.

1. For **Snapshot name**, enter the name of the snapshot.

1. Choose **Take snapshot**.

The **Snapshots** page appears, with the new Multi-AZ DB cluster snapshot's status shown as `Creating`. After its status is `Available`, you can see its creation time.

## AWS CLI
<a name="USER_CreateMultiAZDBClusterSnapshot.CLI"></a>

You can create a Multi-AZ DB cluster snapshot by using the AWS CLI [ create-db-cluster-snapshot](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-cluster-snapshot.html) command with the following options:
+ `--db-cluster-identifier`
+ `--db-cluster-snapshot-identifier`

In this example, you create a Multi-AZ DB cluster snapshot called *`mymultiazdbclustersnapshot`* for a DB cluster called *`mymultiazdbcluster`*.

**Example**  
For Linux, macOS, or Unix:  

```
1. aws rds create-db-cluster-snapshot \
2.     --db-cluster-identifier mymultiazdbcluster \
3.     --db-cluster-snapshot-identifier mymultiazdbclustersnapshot
```
For Windows:  

```
1. aws rds create-db-cluster-snapshot ^
2.     --db-cluster-identifier mymultiazdbcluster ^
3.     --db-cluster snapshot-identifier mymultiazdbclustersnapshot
```

## RDS API
<a name="USER_CreateMultiAZDBClusterSnapshot.API"></a>

You can create a Multi-AZ DB cluster snapshot by using the Amazon RDS API [CreateDBClusterSnapshot](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBClusterSnapshot.html) operation with the following parameters:
+ `DBClusterIdentifier`
+ `DBClusterSnapshotIdentifier`

## Deleting a Multi-AZ DB cluster snapshot
<a name="USER_DeleteMultiAZDBClusterSnapshot"></a>

You can delete Multi-AZ DB snapshots managed by Amazon RDS when you no longer need them. For instructions, see [Deleting a DB snapshot for Amazon RDS](USER_DeleteSnapshot.md).

# Deleting a DB snapshot for Amazon RDS
<a name="USER_DeleteSnapshot"></a>

You can delete DB snapshots managed by Amazon RDS when you no longer need them.

**Note**  
To delete backups managed by AWS Backup, use the AWS Backup console. For information about AWS Backup, see the [https://docs.aws.amazon.com/aws-backup/latest/devguide](https://docs.aws.amazon.com/aws-backup/latest/devguide).

## Deleting a DB snapshot
<a name="USER_DeleteRDSSnapshot"></a>

You can delete a manual, shared, or public DB snapshot using the AWS Management Console, the AWS CLI, or the RDS API.

To delete a shared or public snapshot, you must sign in to the AWS account that owns the snapshot.

If you have automated DB snapshots that you want to delete without deleting the DB instance, change the backup retention period for the DB instance to 0. The automated snapshots are deleted when the change is applied. You can apply the change immediately if you don't want to wait until the next maintenance period. After the change is complete, you can then re-enable automatic backups by setting the backup retention period to a number greater than 0. For information about modifying a DB instance, see [Modifying an Amazon RDS DB instance](Overview.DBInstance.Modifying.md).

Retained automated backups and manual snapshots incur billing charges until they're deleted. For more information, see [Retention costs](USER_WorkingWithAutomatedBackups.Retaining.md#USER_WorkingWithAutomatedBackups.RetentionCosts).

If you deleted a DB instance, you can delete its automated DB snapshots by removing the automated backups for the DB instance. For information about automated backups, see [Introduction to backups](USER_WorkingWithAutomatedBackups.md).

### Console
<a name="USER_DeleteSnapshot.CON"></a>

**To delete a DB snapshot**

1. Sign in to the AWS Management Console and open the Amazon RDS console at [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/).

1. In the navigation pane, choose **Snapshots**.

   The **Manual snapshots** list appears.

1. Choose the DB snapshot that you want to delete.

1. For **Actions**, choose **Delete snapshot**.  
![\[Delete snapshot\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/delete-snapshot.png)

1. Choose **Delete** on the confirmation page.  
![\[Confirm snapshot deletion\]](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/images/delete-snapshot-confirm.png)

### AWS CLI
<a name="USER_DeleteSnapshot.CLI"></a>

You can delete a DB snapshot by using the AWS CLI command [delete-db-snapshot](https://docs.aws.amazon.com/cli/latest/reference/rds/delete-db-snapshot.html). 

The following options are used to delete a DB snapshot. 
+ `--db-snapshot-identifier` – The identifier for the DB snapshot. 

**Example**  
The following code deletes the `mydbsnapshot` DB snapshot.   
For Linux, macOS, or Unix:  

```
1. aws rds delete-db-snapshot \
2.     --db-snapshot-identifier mydbsnapshot
```
For Windows:  

```
1. aws rds delete-db-snapshot ^
2.     --db-snapshot-identifier mydbsnapshot
```

### RDS API
<a name="USER_DeleteSnapshot.API"></a>

You can delete a DB snapshot by using the Amazon RDS API operation [DeleteDBSnapshot](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBSnapshot.html). 

The following parameters are used to delete a DB snapshot. 
+ `DBSnapshotIdentifier` – The identifier for the DB snapshot. 