Note
This view is available starting with V4.0.0.
Overview
Displays the cleanup policies set for expired cleanup and automatic cleanup under each tenant.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| POLICY_NAME | varchar(256) | NO | Cleanup Policy Name |
| RECOVERY_WINDOW | varchar(64) | NO | Recoverable Time Window. Default value: 0. |
Sample query
The sys tenant can view the cleanup policies of all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_DELETE_POLICY;
The query result is as follows:
+-----------+-------------+-----------------+
| TENANT_ID | POLICY_NAME | RECOVERY_WINDOW |
+-----------+-------------+-----------------+
| 1002 | default | 7d |
+-----------+-------------+-----------------+
1 row in set
References
View the progress of a running backup cleanup job: CDB_OB_BACKUP_DELETE_JOBS
View the progress of backup cleanup tasks in progress: CDB_OB_BACKUP_DELETE_TASKS
View the job history of backup cleanup: CDB_OB_BACKUP_DELETE_JOB_HISTORY
View the history of a backup cleanup task: CDB_OB_BACKUP_DELETE_TASK_HISTORY
For detailed operations on setting the cleanup strategy, see Automatically clean up expired backups.
