Skip to main content

Upgrade on Docker

To run OpenMetadata with Docker, you can simply download the docker-compose.yml file. Optionally, we added some Named Volumes to handle data persistence.
You can find more details about Docker deployment here
Below we have highlighted the steps needed to upgrade to the latest version with Docker.

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.

Back Up 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 Portal > PostgreSQL Flexible Server > Server Parameters. Search for azure.extensions and add pg_trgm, separated by a comma 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).

Backward Incompatible Changes

The following changes can affect your upgrade.

2.1.0

The 2.1.0 release includes the following changes.

MySQL Database and Flowable Tables Convert to utf8mb4

When you upgrade a MySQL deployment, the migration sets the OpenMetadata database character set to utf8mb4 with the utf8mb4_0900_ai_ci collation. It also converts the Flowable workflow tables (the ACT_* tables) that use a different character set or collation. Tables that already match aren’t changed. The migration temporarily turns off foreign key checks for its session while it converts tables, and then restores the original setting. Before you upgrade, check the following:
  • MySQL version: The utf8mb4_0900_ai_ci collation is available in MySQL 8.0 and later.
  • Database user: The user that runs the migration needs privileges to alter the database and its tables.
  • Duration: Converting large Flowable tables can lengthen the upgrade.
This applies to MySQL only. PostgreSQL deployments aren’t affected.

Metadata That 2.0.x Ingestion Removed Is Restored

If you upgrade from a release earlier than 2.0.5, the migration restores descriptions, display names, table constraints, retention periods, and tags (including Tier tags) that 2.0.x ingestion removed. Each restore creates a new version of the entity, so the version history of affected assets grows. The migration logs and skips any entity it can’t restore, so a failure doesn’t stop the upgrade.

PostgreSQL Rebuilds the isBot Column

On PostgreSQL, the migration drops and recreates the generated isBot column on user_entity. This rewrites the table and holds an exclusive lock, so sign-ins and user writes wait until it finishes. Run the upgrade in a maintenance window if you have a very large user table. MySQL deployments aren’t affected.

Run Search Indexing After the Upgrade

The migration marks the Search Indexing application to cover all entities and clears earlier success records for it and for the RDF index. After the upgrade, run Search Indexing so that the new indexes and mappings are built. If you use RDF, run the RDF Index application afterwards.

Upgrade Process

1

Stop the Running Deployment

Stop the running Docker Compose deployment:
2

Replace the Docker Compose File

Download the Docker Compose service file from the OpenMetadata GitHub releases page, then replace your existing file with it.
If you run the Resource Description Framework (RDF) store from the OpenMetadata Docker Compose files, the 2.1 file uses a new Fuseki image. It also has new settings and a new data volume. The old volume is not reused, so the new store starts empty. Read the Fuseki changes before you replace the file. For more information, see Data Governance.
The OpenMetadata server image now runs as user 65532. If you mount host folders into the server container, make sure that user can write to them. For more information, see Platform, Configuration & Security.
3

Start the Deployment

Start the Docker Compose service:

Post-Upgrade Steps

Complete these steps after the upgrade finishes.

Reindex

Reindex all the entities after the upgrade.

With UI

Follow these steps to reindex using the UI.
1

Open the Search Indexing Application

Click the Profile icon and go to Settings > Applications. Then click Search Indexing.
2

Run the Application

Select the Schedule tab and click Run now. Every reindex rebuilds the search indexes from scratch, so the application has no Recreate Indexes option. The Entities field defaults to All, which is the setting you need after an upgrade.
For more information, see Reindexing Search. If you use the Resource Description Framework (RDF), run the RDF Index application from Settings > Applications after the search reindex finishes.

With Kubernetes

Follow these steps to reindex using the command-line interface (CLI).
1

List the CronJobs

Check the available CronJobs:
The output looks similar to this:
2

Create a Job from the CronJob

Create a one-time job from the cron-reindex CronJob. Replace <job_name> with a name of your choice.
The output looks similar to this:
3

Check the Job Status

Verify that the job completed:
The output looks similar to this:
4

View the Logs

Replace <job_name> with the name of the job you created:

(Optional) Update Your OpenMetadata Ingestion Client

If you run the ingestion workflows externally or use a custom Airflow installation, make sure the Python client you use matches the OpenMetadata server version. For example, if you upgrade the server to the version x.y.z, update your client with:
The plugin parameter is a comma-separated list of the sources you want to ingest. For example:
You can find specific instructions for each connector in the Connectors section. If you work with your own Airflow deployment, and not the openmetadata-ingestion image, also upgrade openmetadata-managed-apis:

Re-Deploy Ingestion Pipelines

Re-deploy your ingestion pipelines so that they run with the upgraded server. Ingestion pipelines appear as agents in the UI.

With UI

Follow these steps to re-deploy the agents using the UI.
1

Open the Service

Go to Connections > Databases and open the service. Repeat these steps for every service that has agents, including the other service types, such as Dashboards or Messaging.
2

Open the Metadata Agents

Click the Agents tab.
3

Re-Deploy the Agent

Click the ⋮ menu next to the agent and select Re-deploy. You need edit permission on the service.
To re-deploy every service pipeline at once, run sh openmetadata-ops.sh deploy-pipelines. For more information, see The openmetadata-ops Script.

With Kubernetes

Follow these steps to deploy the pipelines using the CLI.
1

List the CronJobs

Check the available CronJobs:
The output looks similar to this:
2

Create a Job from the CronJob

Create a one-time job from the cron-deploy-pipelines CronJob. Replace <job_name> with a name of your choice.
The output looks similar to this:
3

Check the Job Status

Verify that the job completed:
The output looks similar to this:
4

View the Logs

Replace <job_name> with the name of the job you created:
If you see broken directed acyclic graphs (DAGs), select all the pipelines from all the services and re-deploy them.

The openmetadata-ops Script

The openmetadata-ops script manages and migrates the database and the search indexes, reindexes existing data into Elasticsearch or OpenSearch, and re-deploys service pipelines.

Usage

The script is in the bootstrap directory of your OpenMetadata installation. Its general form is:

Commands

The table lists the most common commands.
drop-create permanently deletes all tables and metadata in the configured database. Never run it as part of a normal upgrade. drop-indexes removes all search indexes, and db-tune with --apply changes the database. Back up your database before you run any of these commands.

Examples

Display the help message:
Migrate the database schema and search index mappings:
Reindex data into the search engine:

Troubleshooting

Resolve common permission and configuration issues after upgrading on Docker.