This topic describes how to stop an ongoing backup clearing task.
Stop manual clearing
Log on to the
systenant as therootuser.Execute the following statement to stop the ongoing clearing task:
obclient> ALTER SYSTEM CANCEL DELETE BACKUP;
Stop automatic clearing
Before you stop an automatic backup clearing task, disable automatic backup clearing so that the task will not be scheduled again.
Log on to the
systenant as therootuser.Disable automatic backup clearing.
If you have enabled automatic backup clearing by setting the
backup_dest_optionparameter, you must change the value of theauto_delete_obsolete_backupparameter toFalseforbackup_dest_option. For more information about theauto_delete_obsolete_backupparameter forbackup_dest_option, see Preparations for backup.If you have enabled automatic backup clearing by setting the cluster parameter
auto_delete_expired_backup, you must set the value of this parameter toFalse.Execute the following statement to stop the ongoing clearing task:
obclient> ALTER SYSTEM CANCEL DELETE BACKUP;
Verify whether a clearing task has been stopped
After you stop the clearing task, you can view the internal __all_virtual_backup_clean_info table to verify whether the clearing task is stopped.
Log on to the
systenant as therootuser.Check whether the clearing task is stopped.
For example:
obclient> SELECT tenant_id,status FROM oceanbase.__all_virtual_backup_clean_info; +-----------+--------+ | tenant_id | status | +-----------+--------+ | 1 | STOP | | 1001 | STOP | | 1002 | STOP | +-----------+--------+ 3 rows in setIf the value of
statusisSTOP, the task is stopped.
More information
If the backup data clearing task is not stopped after you execute the preceding statement, try stopping all tasks related to the backup. For more information, see Force stop all backup-related tasks.