The instance recycle bin manages deleted databases and tables in the instance. This topic describes how to manage the recycle bin, including enabling/disabling it, viewing recycled objects, and purging the recycle bin.
Considerations
Before using the instance recycle bin, note the following:
Deleted databases and tables are moved to the recycle bin. You can restore these objects from the recycle bin. Storage space is only released after objects are purged from the recycle bin.
Changes to recycle bin settings only affect new sessions. Existing sessions established before the changes remain unaffected.
Standby instances inherit the recycle bin settings from their primary instance and are read-only. You cannot independently enable the recycle bin or modify settings on standby instances.
Delete/restore operations performed in the primary instance's recycle bin are automatically synchronized to standby instances.
Note
Operations on the primary instance's recycle bin do not directly affect the standby instance's recycle bin content. The standby's recycle bin is updated during primary-standby synchronization.
Access instance recycle bin
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
Click the name of the target instance in the instance list to enter the Overview page of the instance.
In the left navigation pane, click Recycle Bin to access the instance recycle bin.
Enable instance recycle bin
Access the instance recycle bin.
On the Recycle Bin page, click Enable Recycle Bin.
After the recycle bin is enabled successfully, any database and table deletion operations will be displayed in the recycle bin.
View instance recycle bin
Access the instance recycle bin.
On the Recycle Bin page, you can view the deleted content.
a. Click the Databases tab to view the deleted database information, including original database name, storage occupied, recycle time, auto-delete time, and the status.
Select Delete in the Actions column, or select multiple databases and click Batch Delete at the bottom of the page to physically delete the selected databases. After confirming the deletion, the status of the specified database will change to Deleting, until the deletion task is completed.
Click the button in the Actions column to select Restore, or select multiple databases and click Batch Restore at the bottom of the page to restore the selected databases. After confirming the restoration, the status of the specified database will change to Restoring, until the restoration task is completed.
b. Click the Tables tab to view the deleted table information, including original table name, original database name, storage occupied, recycle time, auto-delete time, and the status.
Click the button in the Actions column to select Delete, or select multiple tables and click Batch Delete at the bottom of the page to physically delete the selected tables.
Click the button in the Actions column to select Restore, or select multiple tables and click Batch Restore at the bottom of the page to restore the selected tables.
Purge instance recycle bin
Note
The recycle bin's default retention period is 7 days (aligned with the backup retention period), with a maximum setting of 1096 days. However, manually purging the recycle bin or setting a retention period shorter than the backup retention period may compromise the ability to perform complete, lossless recovery.
Access the instance recycle bin.
On the Recycle Bin page, click Actions > Set Auto-delete Period on the right side of Auto-delete Period.
In the pop-up window, set the auto-delete period and click OK. After setting, the system will automatically empty the recycle bin at the daily compaction time after the end of the auto-delete period.
Note
You can disable auto-delete by clicking Actions > Disable Auto-delete on the right side of Auto-delete Period on the Recycle Bin page.
- You can also click Empty Recycle Bin at the top right of the page to manually empty the recycle bin.
Disable instance recycle bin
Notice
Disabling the recycle bin does not immediately delete the databases and tables already in the recycle bin. You can manually delete them or let them be deleted automatically after expiration.
Access the instance recycle bin.
On the Recycle Bin page, click Disable Recycle Bin at the top right of the page.
In the pop-up window, click Disable to confirm the operation.