Upgrade guide

2025-05-28 08:26:41  Updated

Applicable versions

OceanBase Admin Toolkit (OAT) V3.2.0 and later.

Considerations

  • You cannot upgrade OAT from a version earlier than V3.2.0 to V4.3.0. Services and components managed in OAT of these versions can only be taken over in OAT V4.3.0.
  • You can directly install OAT V4.3.0 to take over the services and components managed in OAT of earlier versions.
  • You can upgrade OAT from V3.2.0 and later to V4.3.0.

Procedure

OAT V3.2.0 to V4.1.0

The version of MariaDB in OAT V3.2 to V4.0 is earlier than that of MariaDB in OAT V4.1 to V4.2, and the OAT container of a version earlier than V4.1 does not catch the SIGTERM signal. Before you upgrade OAT, you must kill the mysqld process in the OAT container of the earlier version and disable the container. Otherwise, an error may occur.

The following example shows how to upgrade OAT from V3.2.0 to V4.3.0:

  1. Load the image of OAT V4.3.0.

    docker load -i <Image of OAT V4.3.0> 
    
  2. Disable MariaDB in the container.

    # Enter the container.
    docker exec -it <Container name> bash 
    # Terminate ongoing MariaDB service processes. The process name may be mariadbd or mysqld, which is affected by the version of MariaDB.
    pkill mariadbd; pkill mysqld;
    # Make sure that no MariaDB service process is running.
    pgrep 'mariadbd|mysqld'
    # Return to the host.
    exit
    
  3. Query the data mount directory on the host that is specified when you start the container of OAT V3.2.0.

    docker inspect <Container name> -f '{{.Mounts}}'
    

    The following result is returned:

    [{bind  /data_dir /data   true rprivate}]
    

    The /data_dir directory on the host corresponds to the /data directory in the container. The /data_dir directory must be consistent when you start the container of OAT V4.3.0 in Step 5.

  4. Stop and delete the container of OAT V3.2.0.

    docker stop <Container name> && docker rm <Container name>
    
  5. Start the container of OAT V4.3.0 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.3.0_20241025_x86
    
  6. Query the startup logs.

    docker logs -f oat
    

    After the refresh of the startup logs stops, log in to OAT to check whether the upgrade is successful.

OAT V4.1.1 and later

You can upgrade OAT from V4.1.1 and later to V4.3.0. The following example shows how to upgrade OAT from V4.1.1 to V4.3.0:

  1. Load the image of OAT V4.3.0.

    docker load -i <Image of OAT V4.3.0>
    
  2. Query the data mount directory on the host that is specified when you start the container of OAT V4.1.1.

    docker inspect <Container name> -f '{{.Mounts}}'
    

    The following result is returned: The /data_dir directory on the host corresponds to the /data directory in the container. The /data_dir directory must be consistent when you start the container of OAT V4.3.0 in Step 4.

  3. Stop and delete the container of OAT V4.1.1.

    docker stop <Container name> && docker rm <Container name>
    
  4. Start the container of OAT V4.3.0 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.3.0_20241025_x86
    
  5. Query the startup logs.

    docker logs -f oat
    

    After the refresh of the startup logs stops, log in to OAT to check whether the upgrade is successful.

Contact Us