Updated on 2024-07-18 GMT+08:00

Recycling a DB Instance

Scenarios

Deleted DB instances can be moved to the recycle bin. You can rebuild DB instances from the recycle bin to restore data. The DB engine, DB engine version, and storage type of the new DB instance are the same as those of the original DB instance. Other parameters can be reconfigured. DB instances that were deleted up to 7 days ago can be restored.

Constraints

  • The recycle bin is free for use.
  • Read replicas cannot be moved to the recycle bin.
  • A stopped instance will not be moved to the recycle bin after being deleted.
  • The recycle bin is enabled by default and cannot be disabled.

Modifying Recycling Policy

Instances in the recycle bin are retained for 7 days by default. A new recycling policy only applies to DB instances that were put in the recycle bin after the new policy was put into effect. For DB instances that were in the recycle bin before the modification, the original recycling policy takes effect.

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. In the navigation pane on the left, choose Recycle Bin.
  4. On the Recycle Bin page, click Modify Recycling Policy. In the displayed dialog box, set the retention period for the deleted DB instances to 1 to 7 days.
  5. Then, click OK.

Rebuilding a DB Instance

You can rebuild the DB instances in the recycle bin within the retention period.

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. In the navigation pane on the left, choose Recycle Bin.
  4. On the Recycle Bin page, locate the target DB instance to be rebuilt and click Rebuild in the Operation column.
  5. On the Rebuild DB Instance page, configure required information and submit the rebuild task. For details, see Restoring a DB Instance from Backups.