This article will introduce the software update and uninstallation method of obdiag.
Software Update
Method 1: obdiag independent deployment mode updated version
If your obdiag is deployed independently, you can update the version through this section.
- Online update (optional if you have access to the external network)
sudo yum update -y oceanbase-diagnostic-tool
source /opt/oceanbase-diagnostic-tool/init.sh
```<main id="notice" type='explain'>
<h4>Description</h4>
<p> The online update method supports centos7/8 but centos9 is not supported yet. If it is centos9, please refer to the offline update method below. </p>
</main>
- Offline update (optional if external network is not accessible)
OceanBase official website [Download page](https://en.oceanbase.com/softwarecenter) Download the new version of the OceanBase database customized agile diagnostic tool (obdiag).
```bash
yum update -y oceanbase-diagnostic-tool*.rpm
source /opt/oceanbase-diagnostic-tool/init.sh
```- Debian system (such as Ubuntu) updates
OceanBase official website [Download page](https://en.oceanbase.com/softwarecenter) Download the new version of the OceanBase database customized agile diagnostic tool (obdiag).
```bash
apt-get update
apt-get install alien -y
alien --scripts --to-deb oceanbase-diagnostic-tool*.rpm # Convert RPM to DEB
dpkg -i oceanbase-diagnostic-tool*.deb
source /opt/oceanbase-diagnostic-tool/init.sh
```
### Method 2: obd deployment method updates obdiag
If your cluster to be diagnosed is deployed by obd, it is recommended to upgrade obd to V2.5.0 and above. You can use the obdiag tool directly through the obd command without configuring the ~/.obdiag/config.yml file.
- Online update (optional if you have access to the external network)
```bash
# Enable obd remote mirror pull
obd mirror enable remote
# Update obdiag via obd deploy
obd obdiag deploy
```- Offline update (optional if external network is not accessible)
OceanBase official website [Download page](https://en.oceanbase.com/softwarecenter) Download the new version of the OceanBase database customized agile diagnostic tool (obdiag).
```bash
# Copy offline obdiag package into obd mirror store
obd mirror clone oceanbase-diagnostic-tool-xxxxxxxx.rpm
# Update obdiag using obd obdiag deploy
obd obdiag deploy
```
## Software uninstallation
Uninstalling obdiag only supports obdiag independent deployment mode
### obdiag Independent deployment mode updated version
If your obdiag is deployed independently, you can uninstall the software through this section.
```bash
sudo yum remove oceanbase-diagnostic-tool
sudo rm -rf /opt/oceanbase-diagnostic-tool
rm -rf ~/.obdiag/
For systems based on Apt (such as Ubuntu/Debian) and previously installed via alien conversion to a .deb package:
sudo dpkg -r oceanbase-diagnostic-tool
sudo rm -rf /opt/oceanbase-diagnostic-tool
rm -rf ~/.obdiag/
