Purpose
The CANCEL DELETE BACKUP statement is used to cancel a running cleanup task.
The CANCEL DELETE BACKUP statement can only be used to cancel a running cleanup task. If you want to cancel a cleanup task that is no longer scheduled to run, you need to first execute the DROP DELETE BACKUP POLICY statement to delete the automatic cleanup policy, and then execute the CANCEL DELETE BACKUP statement. For more information about the DROP DELETE BACKUP POLICY statement, see DELETE BACKUP.
Privilege requirements
The sys tenant's root user (root@sys) or the administrator user of each tenant must execute this statement. Specifically:
- In MySQL mode, the default administrator user is
root. - In Oracle mode, the default administrator user is
SYS.
Syntax
ALTER SYSTEM CANCEL DELETE BACKUP [TENANT [=] {tenant_name[, tenant_name]...} ];
Parameters
| Parameter | Description |
|---|---|
| tenant_name | The name of the tenant whose cleanup task is to be canceled. You can specify multiple tenant names, separated by commas (,). If the TENANT = tenant_name clause is not specified, it means that all running cleanup tasks in user tenants will be canceled.
NoticeOnly the system tenant can specify the tenant to operate on using the |
Examples
The system tenant cancels the cleanup task
defaultof themysql_tenanttenant.obclient [oceanbase]> ALTER SYSTEM DROP DELETE BACKUP POLICY 'default' TENANT = mysql_tenant;The system tenant cancels the running cleanup tasks of the
mysql_tenantandoracle_tenanttenants.obclient [oceanbase]> ALTER SYSTEM CANCEL DELETE BACKUP TENANT mysql_tenant, oracle_tenant;The
oracle_tenanttenant cancels the running cleanup task of its own tenant.obclient [SYS]> ALTER SYSTEM CANCEL DELETE BACKUP;
