Purpose
You can use the ALTER SYSTEM CANCEL BACKUP statement to stop ongoing backup jobs.
Limitations and considerations
After you use the ALTER SYSTEM CANCEL BACKUP statement to stop ongoing backup jobs for a tenant, the system will generate incomplete backup data. We recommend that you enable automatic backup cleanup for the tenant in advance to clean up incomplete backups in a timely manner to release resources occupied by them. For the statement used to enable automatic backup cleanup, see DELETE BACKUP.
Required privileges
You must execute this statement as the root user of the sys tenant (namely root@sys) or as the administrator of a user tenant.
- The default administrator is the
rootuser in MySQL mode. - The default administrator is the
SYSuser in Oracle mode.
Syntax
ALTER SYSTEM CANCEL BACKUP [TENANT [=] {tenant_name[, tenant_name]...}];
Parameters
| Parameter | Description |
|---|---|
| tenant_name | The name of the tenant for which ongoing backup jobs are to be stopped when you execute this statement in the sys tenant. You can specify multiple tenant names separated with commas (,). If you do not specify this parameter, the ongoing backup jobs of all user tenants are stopped.
NoticeYou must use the |
Examples
Assume that the current cluster has three tenants respectively named sys, mysql_tenant, and oracle_tenant, and that both mysql_tenant and oracle_tenant have ongoing data backup jobs.
Stop the ongoing data backup jobs of all user tenants in the cluster from the sys tenant.
obclient [oceanbase]> ALTER SYSTEM CANCEL BACKUP;In this example, after the statement is executed, the system will stop the ongoing data backup jobs of the
mysql_tenantandoracle_tenanttenants.Stop the ongoing data backup jobs of the
mysql_tenanttenant in the cluster from the sys tenant.obclient [oceanbase]> ALTER SYSTEM CANCEL BACKUP TENANT = mysql_tenant;Stop the ongoing data backup jobs of the
oracle_tenanttenant from the current tenant.obclient [SYS]> ALTER SYSTEM CANCEL BACKUP;