This topic describes the obshell recyclebin command group, which is used to manage attributes in the recycle bin of an OceanBase cluster. This command group requires that the OceanBase cluster has been initialized. You can run the command with the -h/--help option to view the help information of the command, or run the command with the -v/--verbose option to view the detailed execution process when the task fails.
Note
Currently, the recyclebin tenant subcommand group is the only subcommand group in this command group.
obshell recyclebin tenant purge
This command can purge a specified tenant in the recycle bin, and also clear the resource pool of the tenant.
${home_path}/bin/obshell recyclebin tenant purge {tenant_name | object_name} [-y]
# example
/home/admin/oceanbase/bin/obshell recyclebin tenant purge t1 -y
/home/admin/oceanbase/bin/obshell recyclebin tenant purge '__recycle_$_1_1720679549921648'
home_path is the installation directory of OceanBase Database, and obshell is located in the bin directory of the installation directory by default. tenant_name is the original name of the tenant to be purged, and object_name is the object name of the tenant in the recycle bin. You can configure either of them.
In the example, t1 is the original name of the tenant to be purged in the recycle bin, and __recycle_$_1_1720679549921648 is the object name of the tenant in the recycle bin.
You can use the -y/--yes option to specify whether to skip the confirmation prompt. No value is required.
obshell recyclebin tenant flashback
This command can restore a specified tenant in the recycle bin.
${home_path}/bin/obshell recyclebin tenant flashback {tenant_name | object_name} [-n]
# example
/home/admin/oceanbase/bin/obshell recyclebin tenant flashback t1 -n t2
/home/admin/oceanbase/bin/obshell recyclebin tenant flashback __recycle_$_1_1720679549921648
home_path is the installation directory of OceanBase Database, and obshell is located in the bin directory of the installation directory by default. tenant_name is the original name of the tenant to be restored, and object_name is the object name of the tenant in the recycle bin. You can configure either of them.
In the example, t1 is the original name of the tenant to be restored in the recycle bin, and __recycle_$_1_1720679549921648 is the object name of the tenant in the recycle bin.
You can use the -n/--new_name option to specify the new name of the tenant after it is restored from the recycle bin. If this option is not specified, the tenant is restored with its original name.
obshell recyclebin tenant show
This command can display a specified tenant or all tenants in the recycle bin.
${home_path}/bin/obshell recyclebin tenant show [tenant_name | object_name]
# example
obshell recyclebin tenant show t1
obshell recyclebin tenant show '__recycle_$_1_1720679549921648'
obshell recyclebin tenant show
home_path is the installation directory of OceanBase Database, and obshell is located in the bin directory of the installation directory by default. tenant_name is the original name of the tenant to be displayed, and object_name is the object name of the tenant in the recycle bin. You can configure either of them. If neither of them is specified, all tenants in the recycle bin are displayed.
In the example, t1 is the original name of the tenant to be displayed in the recycle bin, and __recycle_$_1_1720679549921648 is the object name of the tenant in the recycle bin.