Skip to main content

Upgrade on Bare Metal

This guide will help you upgrade an OpenMetadata deployment using release binaries.

Prerequisites

Everytime that you plan on upgrading OpenMetadata to a newer version, make sure to go over all these steps:

Version Compatibility Matrix

Before upgrading your OpenMetadata instance, verify that the versions of the external services used in your deployment meet the minimum supported requirements. Upgrading OpenMetadata without compatible versions of these services may cause migration failures or runtime issues.

Note:

If your current deployment uses versions lower than the minimum supported versions listed above, upgrade the respective services before proceeding with the OpenMetadata upgrade process.

Backup your Metadata

Before upgrading your OpenMetadata version we strongly recommend backing up the metadata. The source of truth is stored in the underlying database (MySQL and Postgres supported). During each version upgrade there is a database migration process that needs to run. It will directly attack your database and update the shape of the data to the newest OpenMetadata release. It is important that we backup the data because if we face any unexpected issues during the upgrade process, you will be able to get back to the previous version without any loss.
You can learn more about how the migration process works here.During the upgrade, please note that the backup is only for safety and should not be used to restore data to a higher version.
Since version 1.4.0, OpenMetadata encourages using the builtin-tools for creating logical backups of the metadata: For PROD deployment we recommend users to rely on cloud services for their databases, be it AWS RDS, Azure SQL or GCP Cloud SQL. If you’re a user of these services, you can leverage their backup capabilities directly: You can refer to the following guide to get more details about the backup and restore:

Backup Metadata

Learn how to back up MySQL or Postgres data.

Understanding the “Running” State in OpenMetadata

In OpenMetadata, the “Running” state indicates that the OpenMetadata server has received a response from Airflow confirming that a workflow is in progress. However, if Airflow unexpectedly stops or crashes before it can send a failure status update through the Failure Callback, OpenMetadata remains unaware of the workflow’s actual state. As a result, the workflow may appear to be stuck in “Running” even though it is no longer executing. This situation can also occur during an OpenMetadata upgrade. If an ingestion pipeline was running at the time of the upgrade and the process caused Airflow to shut down, OpenMetadata would not receive any further updates from Airflow. Consequently, the pipeline status remains “Running” indefinitely. Running State in OpenMetadata

Expected Steps to Resolve

To resolve this issue:
  • Ensure that Airflow is restarted properly after an unexpected shutdown.
  • Manually update the pipeline status if necessary.
  • Check Airflow logs to verify if the DAG execution was interrupted.

Update sort_buffer_size (MySQL) or work_mem (Postgres)

Before running the migrations, it is important to update these parameters to ensure there are no runtime errors. A safe value would be setting them to 20MB. If using MySQL You can update it via SQL (note that it will reset after the server restarts):
To make the configuration persistent, you’d need to navigate to your MySQL Server install directory and update the my.ini or my.cnf files with sort_buffer_size = 20971520. If using RDS, you will need to update your instance’s Parameter Group to include the above change. If using Postgres You can update it via SQL (not that it will reset after the server restarts):
To make the configuration persistent, you’ll need to update the postgresql.conf file with work_mem = 20MB. If using RDS, you will need to update your instance’s Parameter Group to include the above change. Note that this value would depend on the size of your query_entity table. If you still see Out of Sort Memory Errors during the migration after bumping this value, you can increase them further. After the migration is finished, you can revert this changes.

Enable pg_trgm Extension (Azure PostgreSQL Flexible Server)

If you are using Azure Database for PostgreSQL (Flexible Server), the migration process requires the pg_trgm extension. By default, Azure restricts this extension and you may encounter:
Resolution Steps:
  1. Allow the extension - Go to Azure PortalPostgreSQL Flexible ServerServer Parameters → Search for azure.extensions → Add pg_trgm (comma-separated if other extensions exist)
  2. Restart the PostgreSQL server for changes to take effect
  3. Create the extension by running:
  4. Proceed with the migration
For detailed troubleshooting, see the Kubernetes Upgrade Troubleshooting section.

MySQL Configuration Required for Airflow 3.x Migration

If you are using MySQL as your Airflow metadata database and upgrading to Airflow 3.x (the new default in OpenMetadata 1.11), you must configure MySQL to allow temporary stored function creation during the migration process.

Root Cause

During the Airflow 3.x database migration on MySQL, Airflow needs to create a temporary stored function (uuid_generate_v7) to backfill UUIDs for the task_instance table. When MySQL runs with binary logging enabled (which is the default in most production setups), it blocks function creation unless log_bin_trust_function_creators is enabled or the user has SUPER privileges. Without this configuration, the migration fails with an error like:
This is a known limitation when running Airflow 3.x migrations on MySQL with binary logging enabled. PostgreSQL users are not affected by this issue. For more details, see the Apache Airflow issues:

Resolution

Option 1: Delete and Recreate the Airflow Database (Strongly Recommended) The simplest and most reliable solution is to delete the existing Airflow database and let OpenMetadata recreate it fresh during startup. The Airflow database only stores workflow execution history and metadata—it does not contain any of your OpenMetadata configurations, connections, or ingestion pipeline definitions.
This is the recommended approach because it avoids all migration complexities and ensures a clean state. Your ingestion pipelines and their configurations are stored in the OpenMetadata database, not in Airflow’s database.
Then recreate the database with the proper character set and grant privileges:
Execute this via command line:
Replace USERNAME and PASSWORD with your MySQL root credentials, and airflow_user with your actual Airflow database user if different. For Docker Quickstart deployments, the default root credentials are root / password.

Option 2: Manual Migration Fix (If You Cannot Delete the Database) If you have specific requirements to preserve the Airflow execution history and cannot delete the database, follow the manual steps below. Step 1: Enable MySQL Configuration First, enable log_bin_trust_function_creators in your MySQL instance to allow Airflow to create the necessary stored function: For Docker deployments, add this to your docker-compose.yml file under the MySQL service:
For standalone MySQL instances, execute this query as a user with sufficient privileges:
Step 2: Clean Airflow Database After enabling the MySQL configuration, choose one of the following options based on your situation: Option 2a: Truncate Task Instance Table If you want to avoid conflicting migration changes, you can truncate the task_instance table. This approach removes all task execution history but preserves your DAGs and connections.
This will delete all historical task execution data. Only use this if you’re okay with losing task run history.
Execute this script:
Option 2b: Fix Stuck Migrations (If Migration Already Failed) If your migration is already stuck midway (the task_instance table was partially modified), you need to reset the migration state before restarting. Save the following SQL script as fix_airflow_migration.sql:
Then execute the script and restart the container:
Replace USERNAME and PASSWORD with your actual MySQL credentials, and ensure the database name matches your configuration (default is airflow_db).

Requirements

This guide assumes that you have an OpenMetadata deployment that you installed and configured following the Bare Metal deployment guide.
Ready to upgrade? Continue to the Upgrade Steps for the step-by-step upgrade process and post-upgrade tasks.