Upgrade and uninstall obdiag

2025-11-28 06:05:02  Updated

This topic describes how to upgrade and uninstall OceanBase Diagnostic Tool (obdiag).

Upgrade the software

Method 1: Upgrade obdiag that is independently deployed

If obdiag is independently deployed, you can upgrade its version based on the description in this section.

  • Online upgrade (when Internet access is available)

    sudo yum update -y oceanbase-diagnostic-tool
    source /opt/oceanbase-diagnostic-tool/init.sh
    

    Note

    The online upgrade method is supported on CentOS 7 and 8. If you use CentOS 9, perform the following operations for offline upgrade.

  • Offline upgrade (when Internet access is unavailable)

    Download the obdiag package of the latest version from OceanBase Download Center.

    yum update -y oceanbase-diagnostic-tool*.rpm
    source /opt/oceanbase-diagnostic-tool/init.sh
    
  • Upgrade obdiag in a Debian-based system, such as Ubuntu

    Download the obdiag package of the latest version from OceanBase Download Center.

    apt-get update
    apt-get install alien -y
    alien --scripts --to-deb  oceanbase-diagnostic-tool*.rpm # Convert the RPM package to a DEB package.
    dpkg -i oceanbase-diagnostic-tool*.deb
    source /opt/oceanbase-diagnostic-tool/init.sh
    

Method 2: Upgrade obdiag by deploying it using obd

If the cluster to be diagnosed is deployed by using OceanBase Deployer (obd), we recommend that you upgrade obd to V2.5.0 or later. Then, you can directly run obdiag commands on obd without the need to configure the ~/.obdiag/config.yml file. For more information about the commands, see obdiag commands.

  • Online upgrade (when Internet access is available)

    # Enable obd to pull remote images
    obd mirror enable remote
    # Upgrade obdiag by deploying it using obd
    obd obdiag deploy
    
  • Offline upgrade (when Internet access is unavailable)

    Download the obdiag package of the latest version from OceanBase Download Center.

    # Copy the offline obdiag package to the image repository of obd
    obd mirror clone oceanbase-diagnostic-tool-xxxxxxxx.rpm
    # Upgrade obdiag by deploying it using obd
    obd obdiag deploy
    

Uninstall the software

You can uninstall obdiag only if it is independently deployed.

Uninstall obdiag that is independently deployed

If obdiag is independently deployed, you can uninstall it based on the description in this section.

sudo yum remove oceanbase-diagnostic-tool
sudo rm -rf /opt/oceanbase-diagnostic-tool
rm -rf ~/.obdiag/

For obdiag that runs on a system based on Advanced Packaging Tools (APT), such as Ubuntu or Debian, and that is installed by using a .deb package converted by using Alien, run the following command to uninstall it:

sudo dpkg -r oceanbase-diagnostic-tool
sudo rm -rf /opt/oceanbase-diagnostic-tool
rm -rf ~/.obdiag/

Contact Us