This topic describes how to hot upgrade OceanBase Migration Service (OMS) Community Edition without affecting the running of data migration and data synchronization tasks.
Limitations
The version of OMS Community Edition must be greater than or equal to V4.2.1.
Before and during a hot upgrade, make sure that no new tasks are being created in OMS Community Edition.
After a successful hot upgrade, you must refresh the browser or delete data to view the features of the upgraded version. For information about how to delete data, see the "FAQs" section.
After a successful hot upgrade, you can create data migration or data synchronization tasks to use the features of the upgraded version.
Existing tasks remain unchanged after a hot upgrade. Especially, the new configurations added in the upgraded version will not be present in the existing tasks.
During a forward switchover after a successful hot upgrade, the incremental start point is invalid. This feature was introduced in OMS Community Edition V4.2.11-CE and is only supported when creating new data migration tasks.
Procedure
Log in to the host where OMS Community Edition is installed.
Run the following command to obtain the hot upgrade script from the new image.
Notice
Before you obtain the hot upgrade script, make sure that you have loaded the new image as OMS_IMAGE.
sudo docker run -d --net host --name oms-config-tool ${OMS_IMAGE} bash \ && sudo docker cp oms-config-tool:/root/docker_dump_file_from_image.sh . \ && sudo docker cp oms-config-tool:/root/docker_copy_dumpfile_to_container.sh . \ && sudo docker cp oms-config-tool:/root/docker_copy_dumpfile_rollback.sh . \ && sudo docker rm -f oms-config-toolIn a multi-node upgrade scenario, if you have enabled the high availability (HA) feature, disable it first. For more information, see Modify the configuration of the high availability feature.
Back up the metadata of the OMS Community Edition database.
mysqldump -hxxx.xxx.xxx.1 -P<port> -u<username> -p<password> --triggers=false rm_4210 > /home/admin/rm_4210.sql mysqldump -hxxx.xxx.xxx.1 -P<port> -u<username> -p<password> --triggers=false cm_4210 > /home/admin/cm_4210.sql mysqldump -hxxx.xxx.xxx.1 -P<port> -u<username> -p<password> --triggers=false cm_hb_4210 > /home/admin/cm_hb_4210.sqlParameter descriptions:
Parameter Description -h The information of the host to be exported. -P The port number for connecting to the database. -u The username for connection. -p The password for connecting to the database. --triggers Whether to export triggers. Default value: false (no export). rm_4210、cm_4210、cm_hb_4210 The backup of the rm, cm, and cm_hb databases is stored as SQL files. The format is Database name > Storage path of the SQL file.sql. Replace the values with those in your environment.Copy the new image file to the host directory.
sh docker_dump_file_from_image.sh ${OMS_IMAGE}Enter the OMS Community Edition container and stop the O&M service.
supervisorctl stop nginx oms_console oms_drc_cm oms_drc_supervisor sshdCopy the new image file to the OMS Community Edition container.
sh docker_copy_dumpfile_to_container.sh ${OMS Community Edition container name}Run the hot upgrade script
sh /root/docker_hot_update_init.sh.sudo docker exec -it ${OMS Community Edition container name} /root/docker_hot_update_init.shIf the hot upgrade script fails, you can use
docker_copy_dumpfile_rollback.shto roll back the operation. The command is as follows:Notice
You can use this script to roll back only if steps 1 to 7 are executed successfully, but step 8 fails. Otherwise, the rollback script will clear the original files because no backup files are available.
sh docker_copy_dumpfile_rollback.sh ${OMS Community Edition container name} /home/admin/logs/backup2025xxxx sudo docker exec -it ${OMS Community Edition container name} /root/docker_init.shNote
/home/admin/logs/backup2025xxxxindicates the directory wheredocker_copy_dumpfile_rollback.shbacks up the information of the previous OMS Community Edition version in the container. The default directory is/home/admin/logs, and the files in this directory havebackupas the prefix.
FAQs
Failed to access OMS Community Edition
Problem description
After a hot upgrade, you may encounter the following issues when you access OMS Community Edition.
The error
HTTP Status 500 – Internal Server Erroroccurs.
The name of the logged-in user is not displayed in the upper-right corner of the page.
Solution
Go to the Site Settings page.

Click Delete Data.

Hot upgrade from OMS Community Edition V4.2.1-CE to V4.2.11-CE
Before you hot upgrade OMS Community Edition V4.2.1-CE to V4.2.11-CE, if the OceanBase Store component of a newly created task is not started or fails to start, you need to add the drc_frame.dbversion parameter to the OceanBase Store parameters to indicate the version number of OceanBase Database after the upgrade is successful.