Note
- This topic only applies to the upgrade of OceanBase Admin Toolkit (OAT) from V3.2, V4.0, or V4.1.1 to V4.1.2. Versions earlier than V3.2 support only takeover, but not upgrades.
- This topic describes how to upgrade OAT V3.2 to V4.1.2.
Procedure
To upgrade OAT V3.2 to V4.1.2, 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 (According to different versions of MariaDB, the actual process name may be Mariadbd or mysqld). pkill mariadbd; pkill mysqld; # Verify that no MySQL 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 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.1.2 in Step 5.Stop and delete the OAT V3.2 container.
docker stop <container name> && docker rm <container name>Start the OAT V4.1.2 container from the data mount directory.
docker run -d --name oat --net host -v <data_dir>:/data --restart on-failure:5 $oat_imageQuery startup logs.
docker logs -f oatAfter the refreshing of the startup logs stops, log on to OAT to check whether the upgrade is successful.