Purpose
You can use this statement to cancel an ongoing backup job.
Limitations and considerations
Incomplete backup data is generated after you cancel an ongoing backup. We recommend that you enable automatic backup cleanup before you perform backup so that incomplete backup data can be cleared as soon as possible and will not occupy resources. For more information about the statement for enabling automatic backup cleanup, see DELETE BACKUP POLICY.
Required privileges
Only the root user of the sys tenant (root@sys) or the administrator user of a user tenant can execute this statement.
- The default administrator user in MySQL mode is
root. - The default administrator user in Oracle mode is
SYS.
Syntax
ALTER SYSTEM CANCEL BACKUP [TENANT [=] {tenant_name[, tenant_name]...}];
Parameters
| Parameter | Description |
|---|---|
| tenant_name | The name of the tenant for which you want to cancel the ongoing backup. This parameter is used in the sys tenant. If you specify multiple tenants, separate the tenant names with commas (,). If you do not specify this parameter in the sys tenant, the ongoing backups of all user tenants will be canceled.
NoticeWhen you execute this statement in the |
Examples
Assume that the current cluster contains three tenants: sys, mysql_tenant, and oracle_tenant, and that the mysql_tenant and oracle_tenant tenants have ongoing data backups.
In the
systenant, cancel the ongoing data backups of all user tenants in the cluster.obclient [oceanbase]> ALTER SYSTEM CANCEL BACKUP;After the statement is executed, the system cancels the ongoing data backups of the
mysql_tenantandoracle_tenanttenants.In the
systenant, cancel the ongoing data backup of themysql_tenanttenant.obclient [oceanbase]> ALTER SYSTEM CANCEL BACKUP TENANT = mysql_tenant;In the
oracle_tenanttenant, cancel the ongoing data backup of the current tenant.obclient [SYS]> ALTER SYSTEM CANCEL BACKUP;