This topic describes how to use the task commands of OceanBase Shell (OBShell) to manage OBShell tasks. You can specify the -h or --help option in a command to query its help information.
Note
Since OBShell V4.2.3, obshell utilities commands have been changed to obshell task commands, but the obshell utilities commands are still available.
obshell task show
You can run this command to query the information of a specified task.
${home_path}/bin/obshell task show [-i]
# example
/home/admin/oceanbase/bin/obshell task show -i 11
Here, home_path is the installation directory of OceanBase Database. By default, OBShell is installed in the bin directory under the installation directory of OceanBase Database.
The following table describes the options in the command.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| -i/--id | No | String | N/A | The ID of the task that you want to query. If you do not specify this option, the information about the current task is displayed. If no task is running, no information is displayed. |
| -d/--show_detail | No | N/A | N/A | Specifies to display the details of the task. You do not need to set a value for this option. |
| -v/--verbose | No | N/A | N/A | Specifies to return execution details. You do not need to set a value for this option. |
obshell task cancel
You can run this command to stop an unfinished task.
${home_path}/bin/obshell task cancel -i
# example
/home/admin/oceanbase/bin/obshell task cancel -i 11
Here, home_path is the installation directory of OceanBase Database. By default, OBShell is installed in the bin directory under the installation directory of OceanBase Database.
The following table describes the options in the command.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| -i/--id | Yes | String | N/A | The ID of the task to be canceled. |
| -y/--yes | No | N/A | N/A | Specifies to cancel secondary confirmation. You do not need to set a value for this option. |
obshell task rollback
You can run this command to roll back a failed task.
${home_path}/bin/obshell task rollback -i
# example
/home/admin/oceanbase/bin/obshell task rollback -i 11
Here, home_path is the installation directory of OceanBase Database. By default, OBShell is installed in the bin directory under the installation directory of OceanBase Database.
The following table describes the options in the command.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| -i/--id | Yes | String | N/A | The ID of the task to be rolled back. |
| -y/--yes | No | N/A | N/A | Specifies to cancel secondary confirmation. You do not need to set a value for this option. |
obshell task retry
You can run this command to retry a failed task.
${home_path}/bin/obshell task retry -i
# example
/home/admin/oceanbase/bin/obshell task retry -i 11
Here, home_path is the installation directory of OceanBase Database. By default, OBShell is installed in the bin directory under the installation directory of OceanBase Database.
The following table describes the options in the command.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| -i/--id | Yes | String | N/A | The ID of the task to be retried. |
| -y/--yes | No | N/A | N/A | Specifies to cancel secondary confirmation. You do not need to set a value for this option. |
obshell task pass
You can run this command to skip a failed task.
${home_path}/bin/obshell task pass -i
# example
/home/admin/oceanbase/bin/obshell task pass -i 11
Here, home_path is the installation directory of OceanBase Database. By default, OBShell is installed in the bin directory under the installation directory of OceanBase Database.
The following table describes the options in the command.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| -i/--id | Yes | String | N/A | The ID of the task to be skipped. |
| -y/--yes | No | N/A | N/A | Specifies to cancel secondary confirmation. You do not need to set a value for this option. |