This topic describes how to upgrade OceanBase Admin Toolkit (OAT) to V4.2.0, using OAT V3.2 as an example.
Note
This topic only applies to upgrades from OAT V3.2, V4.0, V4.1.1, or V4.1.2 to V4.2.0. Versions earlier than V3.2 only support takeover, but not upgrade.
Procedure
To upgrade OAT V3.2 to V4.2.0, perform the following steps:
Load the image of the new version.
docker load -i <image of the new version>Disable MariaDB in the container.
# Go to the container. docker exec -it <container name> bash # Terminate ongoing MariaDB service processes. Depending on the version of MariaDB, the process name may be mariadbd or mysqld. pkill mariadbd; pkill mysqld; # Make sure that no MariaDB service process is running. pgrep 'mariadbd|mysqld' # Return to the host. exitQuery the data mount directory on the host specified when you start the OAT V3.2 container.
docker inspect <container name> -f '{{.Mounts}}'The following sample result is returned:
[{bind /data_dir /data true rprivate}]The
/data_dirdirectory on the host corresponds to the/datadirectory in the container. The/data_dirdirectory must be consistent when you start OAT V4.2.0 in Step 5.Stop and delete the OAT V3.2 container.
docker stop <container name> && docker rm <container name>Start the OAT V4.2.0 container from the data mount directory.
docker run -d --name oat --net host -v <data_dir>:/data --restart on-failure:5 reg.docker.alibaba-inc.com/oceanbase/oat:4.2.0_20231027_x86Query startup logs.
docker logs -f oatAfter the refreshing of the startup logs stops, log on to OAT to check whether the upgrade is successful.