You can stop an ongoing backup task. After you stop the backup task, the backup cleanup task immediately clears the incomplete backup data if automatic backup cleanup is enabled.
Prerequisites
Incomplete backup data is generated after you stop an ongoing backup task. We recommend that you enable automatic backup cleanup before you perform backup so that the incomplete backup data can be cleared as soon as possible without occupying resources. For more information about how to enable automatic backup cleanup, see Automatically clean up expired backups.
Background information
Assume that the current cluster contains three tenants: sys, mysql_tenant, and mysql_tenant1, and that data backup is being performed for the mysql_tenant and mysql_tenant1 tenants.
Stop data backup from the sys tenant
You can stop data backup for all tenants or a specified tenant in the cluster from the sys tenant.
Log in to the
systenant of the cluster as therootuser.Execute the following statement to stop a data backup task:
Stop data backup for all tenants in the cluster
Execute the following statement to stop the data backup tasks of all tenants in the cluster:
obclient [(none)]> ALTER SYSTEM CANCEL BACKUP;Stop data backup for a specified tenant in the cluster
Execute the following statement to stop an ongoing data backup task of a specified tenant without affecting other tenants in the cluster:
obclient [(none)]> ALTER SYSTEM CANCEL BACKUP TENANT = mysql_tenant;Note
If you specify multiple tenants, separate the tenant names with commas (,).
Stop data backup from a user tenant
You can stop an ongoing data backup task of a user tenant without affecting other tenants.
Log in to the database as a tenant administrator.
In this example, you can log in to the
mysql_tenantormysql_tenant1tenant as therootuser.Execute the following statement to stop a data backup task:
obclient [(none)]> ALTER SYSTEM CANCEL BACKUP;