RDS Database Backup Tutorial173


In this tutorial, we will cover how to create and manage backups of your Amazon Relational Database Service (RDS) database. RDS backups are stored in Amazon Simple Storage Service (S3) and can be restored to a new or existing database instance.

Creating a Backup

To create a backup of your RDS database, you can use the AWS Management Console, the AWS CLI, or the RDS API. If you are using a version of RDS prior to version 6.0, you must purchase provisioned IOPS storage to enable backups.

AWS Management Console


1. Open the RDS Management Console.
2. Select the database instance that you want to back up.
3. Click on the Backups tab.
4. Click on the Create backup button.
5. Enter a name for the backup.
6. Select the backup type. The available backup types are: * Automated backup: An automated backup is created automatically according to the backup schedule that you specify.
* Manual backup: A manual backup is created only when you explicitly create it.

7. Select the backup schedule. The available backup schedules are: * Daily: A backup is created every day.
* Weekly: A backup is created every week.
* Monthly: A backup is created every month.

8. Click on the Create backup button.

AWS CLI


You can use the following AWS CLI command to create a backup of your RDS database:```
aws rds create-db-backup \
--db-instance-identifier my-db-instance \
--db-backup-identifier my-db-backup \
--backup-type automated \
--backup-window 10:00-11:00
```

RDS API


You can use the following RDS API call to create a backup of your RDS database:```
CreateDBBackup(DBInstanceIdentifier=string, DBBackupIdentifier=string, BackupType=string, BackupWindow=string)
```

Managing Backups

Once you have created a backup of your RDS database, you can manage it using the AWS Management Console, the AWS CLI, or the RDS API.

AWS Management Console


1. Open the RDS Management Console.
2. Select the database instance that you want to manage backups for.
3. Click on the Backups tab.
4. You will see a list of all the backups for the selected database instance.

AWS CLI


You can use the following AWS CLI command to list the backups for an RDS database instance:```
aws rds describe-db-backups \
--db-instance-identifier my-db-instance
```

RDS API


You can use the following RDS API call to list the backups for an RDS database instance:```
DescribeDBBackups(DBInstanceIdentifier=string, DBBackupIdentifier=string, Filters=[
{
Name=string,
Values=[string],
},
], MaxRecords=integer, Marker=string)
```

Restoring a Backup

You can restore a backup of your RDS database to a new or existing database instance. To restore a backup, you can use the AWS Management Console, the AWS CLI, or the RDS API.

AWS Management Console


1. Open the RDS Management Console.
2. Click on the Databases tab.
3. Click on the Create database button.
4. Select the Restore from a backup option.
5. Select the backup that you want to restore.
6. Enter a name for the new database instance.
7. Click on the Create database button.

AWS CLI


You can use the following AWS CLI command to restore a backup of your RDS database:```
aws rds restore-db-instance-from-db-backup \
--db-instance-identifier my-new-db-instance \
--db-backup-identifier my-db-backup \
--db-instance-class \
--db-subnet-group my-db-subnet-group
```

RDS API


You can use the following RDS API call to restore a backup of your RDS database:```
RestoreDBInstanceFromDBBackup(DBInstanceIdentifier=string, DBBackupIdentifier=string, DBInstanceClass=string, Port=integer, AvailabilityZone=string, DBSubnetGroupName=string)
```

2025-01-26


Previous:Enterprise Cloud Computing Platforms: Empowering Businesses with Efficiency and Innovation

Next:Web Extension Development Video Tutorial