> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade on Docker | OpenMetadata Deployment Upgrade Guide

> Perform upgrades for Docker-based deployments by managing image versions, environment variables, and service configurations.

# Upgrade on DockerTo run OpenMetadata with Docker, you can simply download the `docker-compose.yml` file. Optionally, we added some
Named Volumes to handle data persistence.> [!TIP]
>
> You can find more details about Docker deployment [here](https://docs.open-metadata.org/v2.1.x/deployment/docker.md)Below we have highlighted the steps needed to upgrade to the latest version with Docker.## Breaking ChangesOpenMetadata 2.1 changes the API and ingestion. It also changes configuration and sign-in behavior. The highest-impact changes
are listed below. For more information, see
[Breaking Changes: 2.0 to 2.1](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/overview.md).* **Collaboration**: The `/v1/feed` API is removed. Use `/v1/conversations`, `/v1/tasks`, `/v1/activity`, and `/v1/announcements`. Task and suggestion event types are removed from alerts. For more information, see [Collaboration: Conversations, Tasks, Announcements, Activity, and Alerts](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/collaboration.md).
* **Ingestion**: The Delta Lake connector is removed, and its services become Custom Database services. Ingestion pipelines created through the API must set `sourceConfig.config.type`. For more information, see [Ingestion & Connectors](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/ingestion-and-connectors.md).
* **Sign-in**: OpenID Connect (OIDC) sign-in now returns the provider's ID token to the browser. Email-based identity is available as an opt-in. User emails are lowercased on upgrade. For more information, see [Platform, Configuration & Security](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/platform-and-security.md).
* **Permissions**: Search, lineage, and several other reads now check what the caller may view. Some endpoints are admin only. For more information, see [API & Schema Contracts](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/api-and-schema.md) and [Lineage](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/lineage.md).
* **Applications**: Applications no longer create alerts from their definition, and the Search Indexing history is reset. For more information, see [Applications & Automation](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/applications-and-automation.md).
* **Deployment**: The server image runs on a distroless Debian base as user `65532`. The bundled Fuseki Resource Description Framework (RDF) store uses a new image and data volume. For more information, see [Platform, Configuration & Security](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/platform-and-security.md) and [Data Governance](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/data-governance.md).> [card] [Read the full breaking changes guide](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/overview.md)
>
> Component-by-component breakdown across API, search, collaboration, governance, data quality,
> lineage, ingestion, applications, platform, and UI.## PrerequisitesEverytime that you plan on upgrading OpenMetadata to a newer version, make sure to go over all these steps:### Version Compatibility MatrixBefore 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.

\<table><thead><tr><th>Service</th>
            \<th>Minimum Version</th></tr></thead>
        \<tbody /></table>

## **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 MetadataBefore 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.> [!NOTE]
>
> You can learn more about how the migration process works [here](https://docs.open-metadata.org/deployment/upgrade/how-does-it-work).
>
> **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**:- [mysqldump](https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html) for MySQL
- [pg\_dump](https://www.postgresql.org/docs/current/app-pgdump.html) for PostgresFor PROD deployment we recommend users to rely on cloud services for their databases, be it [AWS RDS](https://docs.aws.amazon.com/rds/),
[Azure SQL](https://azure.microsoft.com/en-in/products/azure-sql/database) or [GCP Cloud SQL](https://cloud.google.com/sql/).If you're a user of these services, you can leverage their backup capabilities directly:- [Creating a DB snapshot in AWS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html)
- [Backup and restore in Azure MySQL](https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-backup)
- [About GCP Cloud SQL backup](https://cloud.google.com/sql/docs/mysql/backup-recovery/backups)You can refer to the following guide to get more details about the backup and restore:> [card] [Backup Metadata](https://docs.open-metadata.org/v2.1.x/deployment/backup-restore-metadata.md)
>
> Learn how to back up MySQL or Postgres data.### Understanding the "Running" State in OpenMetadataIn 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](https://mintcdn.com/openmetadata/FFPgqWxUp0cM2_kH/public/images/deployment/upgrade/running-state-in-openmetadata.png?fit=max\&auto=format\&n=FFPgqWxUp0cM2_kH\&q=85\&s=2d5413de409372e799f261fff84d40d5)#### Expected Steps to ResolveTo 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):```sql theme={null}
SET GLOBAL sort_buffer_size = 20971520
```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](https://dev.mysql.com/doc/refman/8.0/en/option-files.html) with `sort_buffer_size = 20971520`.If using RDS, you will need to update your instance's [Parameter Group](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html)
to include the above change.**If using Postgres**You can update it via SQL (not that it will reset after the server restarts):```sql theme={null}
SET work_mem = '20MB';
```To make the configuration persistent, you'll need to update the `postgresql.conf` [file](https://www.postgresql.org/docs/9.3/config-setting.html)
with `work_mem = 20MB`.If using RDS, you will need to update your instance's [Parameter Group](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html)
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 Error`s
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)> [!NOTE]
>
> 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:
>
> ```
> ERROR: extension "pg_trgm" is not allow-listed for users in Azure Database for PostgreSQL
> ```**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:
   ```sql theme={null}
   CREATE EXTENSION IF NOT EXISTS pg_trgm;
   ```
4) **Proceed with the migration**For detailed troubleshooting, see the [Kubernetes Upgrade Troubleshooting](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/kubernetes-troubleshooting.md#azure-postgresql-pg_trgm-extension-requirement) section.### MySQL Configuration Required for Airflow 3.x MigrationIf 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 CauseDuring 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:```
FUNCTION airflow_db.uuid_generate_v7 does not exist
```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:- [https://github.com/apache/airflow/issues/49611](https://github.com/apache/airflow/issues/49611)
- [https://github.com/apache/airflow/issues/54554](https://github.com/apache/airflow/issues/54554)#### 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.> [!TIP]
>
> 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.```bash theme={null}
# Connect to your MySQL instance and drop the Airflow database
docker exec -i openmetadata_mysql mysql -u USERNAME -pPASSWORD -e "DROP DATABASE IF EXISTS airflow_db;"
```Then recreate the database with the proper character set and grant privileges:```sql theme={null}
CREATE DATABASE airflow_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON airflow_db.* TO 'airflow_user'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
```Execute this via command line:```bash theme={null}
# Recreate the Airflow database
docker exec -i openmetadata_mysql mysql -u USERNAME -pPASSWORD -e "CREATE DATABASE airflow_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON airflow_db.* TO 'airflow_user'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;"

# Restart the ingestion container to run migrations on the fresh database
docker restart openmetadata_ingestion
```> [!NOTE]
>
> 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`.After the ingestion container restarts successfully, you must **redeploy all your ingestion pipelines** from the OpenMetadata UI. This registers the DAGs in the fresh Airflow database.*****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:```yaml theme={null}
services:
  mysql:
    command: "--log-bin-trust-function-creators=1"
```For standalone MySQL instances, execute this query as a user with sufficient privileges:```sql theme={null}
SET GLOBAL log_bin_trust_function_creators = 1;
```**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.> [!WARNING]
>
> This will delete all historical task execution data. Only use this if you're okay with losing task run history.```sql theme={null}
-- Clean task_instance table to avoid migration conflicts
USE airflow_db;

-- Truncate task_instance table
TRUNCATE TABLE task_instance;

-- Verify the table is empty
SELECT COUNT(*) FROM task_instance;
```Execute this script:```bash theme={null}
# Run the cleanup script on your MySQL container
docker exec -i openmetadata_mysql mysql -u USERNAME -pPASSWORD -e "USE airflow_db; TRUNCATE TABLE task_instance; SELECT COUNT(*) as remaining_rows FROM task_instance;"

# Restart the ingestion container to apply migrations
docker restart openmetadata_ingestion
```**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`:```sql theme={null}
-- Fix Airflow 3.x migration issue
-- This script fixes the partial migration of task_instance table

USE airflow_db;

-- Check if the migration was partially applied
-- If 'id' column exists but isn't properly configured, we need to fix it

-- First, check the current state
SHOW COLUMNS FROM task_instance LIKE 'id';

-- Drop the problematic column if it exists
SET @exist := (SELECT COUNT(*) FROM information_schema.COLUMNS
    WHERE TABLE_SCHEMA = 'airflow_db'
    AND TABLE_NAME = 'task_instance'
    AND COLUMN_NAME = 'id');

SET @sqlstmt := IF(@exist > 0,
    'ALTER TABLE task_instance DROP COLUMN id',
    'SELECT ''Column does not exist'' AS status');

PREPARE stmt FROM @sqlstmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;

-- Reset the alembic version to before this migration
-- The migration that's failing is: d59cbbef95eb (Add UUID primary key to task_instance)
-- We need to set it back to the previous version: 05234396c6fc
UPDATE alembic_version SET version_num = '05234396c6fc' WHERE version_num = 'd59cbbef95eb';

-- Verify the changes
SELECT * FROM alembic_version;
SHOW COLUMNS FROM task_instance LIKE 'id';
```Then execute the script and restart the container:```bash theme={null}
# Run the fix script on your MySQL container
docker exec -i openmetadata_mysql mysql -u USERNAME -pPASSWORD < fix_airflow_migration.sql

# Restart the ingestion container
docker restart openmetadata_ingestion
```> [!NOTE]
>
> Replace `USERNAME` and `PASSWORD` with your actual MySQL credentials, and ensure the database name matches your configuration (default is `airflow_db`).## Backward Incompatible ChangesThe following changes can affect your upgrade.### 2.1.0The 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 RestoredIf 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` ColumnOn 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 UpgradeThe 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:```bash theme={null}
docker compose down
```**2. Replace the Docker Compose File**Download the Docker Compose service file from the [OpenMetadata GitHub releases page](https://github.com/open-metadata/OpenMetadata/releases/latest), then replace your existing file with it.> [!NOTE]
>
> 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](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/data-governance.md#the-bundled-fuseki-rdf-store-image-changed).> [!NOTE]
>
> 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](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/platform-and-security.md#docker-images-are-distroless).**3. Start the Deployment**Start the Docker Compose service:```bash theme={null}
docker compose -f docker-compose.yml up -d
```## Post-Upgrade StepsComplete these steps after the upgrade finishes.### ReindexReindex all the entities after the upgrade.#### With UIFollow 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](https://docs.open-metadata.org/v2.1.x/how-to-guides/admin-guide/reindexing-search.md).If you use the Resource Description Framework (RDF), run the **RDF Index** application from **Settings** > **Applications** after the search reindex finishes.#### With KubernetesFollow these steps to reindex using the command-line interface (CLI).**1. List the CronJobs**Check the available CronJobs:```bash theme={null}
kubectl get cronjobs
```The output looks similar to this:```text theme={null}
NAME           SCHEDULE      TIMEZONE   SUSPEND   ACTIVE   LAST SCHEDULE   AGE
cron-reindex   0/5 * * * *   <none>     True      0        <none>          31m
```**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.```bash theme={null}
kubectl create job --from=cronjob/cron-reindex <job_name>
```The output looks similar to this:```text theme={null}
job.batch/cron-reindex-one created
```**3. Check the Job Status**Verify that the job completed:```bash theme={null}
kubectl get jobs
```The output looks similar to this:```text theme={null}
NAME               STATUS     COMPLETIONS   DURATION   AGE
cron-reindex-one   Complete   1/1           20s        109s
```**4. View the Logs**Replace `<job_name>` with the name of the job you created:```bash theme={null}
kubectl logs job/<job_name>
```### (Optional) Update Your OpenMetadata Ingestion ClientIf 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:```bash theme={null}
pip install "openmetadata-ingestion[<plugin>]==x.y.z"
```The `plugin` parameter is a comma-separated list of the sources you want to ingest. For example:```bash theme={null}
pip install "openmetadata-ingestion[mysql,snowflake,s3]==x.y.z"
```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`:```bash theme={null}
pip install "openmetadata-managed-apis==x.y.z"
```### Re-Deploy Ingestion PipelinesRe-deploy your ingestion pipelines so that they run with the upgraded server. Ingestion pipelines appear as agents in the UI.#### With UIFollow 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](#the-openmetadata-ops-script).#### With KubernetesFollow these steps to deploy the pipelines using the CLI.**1. List the CronJobs**Check the available CronJobs:```bash theme={null}
kubectl get cronjobs
```The output looks similar to this:```text theme={null}
NAME                    SCHEDULE      TIMEZONE   SUSPEND   ACTIVE   LAST SCHEDULE   AGE
cron-deploy-pipelines   0/5 * * * *   <none>     True      0        <none>          4m7s
```**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.```bash theme={null}
kubectl create job --from=cronjob/cron-deploy-pipelines <job_name>
```The output looks similar to this:```text theme={null}
job.batch/cron-deploy-pipeline-one created
```**3. Check the Job Status**Verify that the job completed:```bash theme={null}
kubectl get jobs
```The output looks similar to this:```text theme={null}
NAME                       STATUS     COMPLETIONS   DURATION   AGE
cron-deploy-pipeline-one   Complete   1/1           13s        3m35s
```**4. View the Logs**Replace `<job_name>` with the name of the job you created:```bash theme={null}
kubectl logs job/<job_name>
```If you see broken directed acyclic graphs (DAGs), select all the pipelines from all the services and re-deploy them.## The `openmetadata-ops` ScriptThe `openmetadata-ops` script manages and migrates the database and the search indexes, reindexes existing data into
Elasticsearch or OpenSearch, and re-deploys service pipelines.### UsageThe script is in the `bootstrap` directory of your OpenMetadata installation. Its general form is:```bash theme={null}
sh openmetadata-ops.sh [-dhV] [COMMAND]
```### CommandsThe table lists the most common commands.> [!WARNING]
>
> `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.| Command | What it does |
| - | - |
| `info` | Shows the migrations that are applied and the ones waiting to be applied on the target database |
| `migrate` | Migrates the OpenMetadata database schema and search index mappings |
| `validate` | Checks that all the migrations have been applied on the target database |
| `repair` | Repairs the `SERVER_MIGRATION_SQL_LOGS` and `SERVER_CHANGE_LOG` tables, which track the migrations. It removes the entries of failed migrations and updates the checksum of migrations that were already applied |
| `changelog` | Prints the change log of the database migrations |
| `check-connection` | Checks that a connection to the target database can be obtained |
| `drop-create` | Deletes every table in the configured database, creates new tables for the current version of OpenMetadata, and re-creates the search indexes |
| `reindex` | Reindexes data into the search engine from the command line |
| `reindex-rdf` | Reindexes all the entities into the RDF triple store |
| `create-indexes` | Creates the indexes in Elasticsearch or OpenSearch |
| `drop-indexes` | Drops all the indexes from Elasticsearch or OpenSearch |
| `deploy-pipelines` | Deploys all the service pipelines |
| `migrate-secrets` | Migrates secrets from the database to the configured Secrets Manager. It does not support migrating between external Secrets Managers |
| `regenerate-bot-tokens` | Regenerates the JSON Web Token (JWT) of every bot user, then re-deploys the deployed ingestion pipelines. Use it after you rotate the JWT signing keys, change the cluster name, or need to replace leaked tokens |
| `adopt-deployment-config` | Replaces the stored values of a setting with the values from the configuration file and environment of the process that runs it. Run it where the server environment is available, for example inside a server pod |
| `analyze-tables` | Analyzes the database tables of every entity |
| `db-tune` | Generates a per-table tuning report for the database. It only reads by default. Pass `--apply` to run the statements it suggests |
| `relationshipCleanup` | Finds orphaned entity relationships. It runs as a dry run by default |
| `tagUsageCleanup` | Finds orphaned tag usages. It runs as a dry run by default |
| `cleanup-flowable-history` | Cleans up old workflow deployments and history. It runs as a dry run by default |### ExamplesDisplay the help message:```bash theme={null}
sh openmetadata-ops.sh --help
```Migrate the database schema and search index mappings:```bash theme={null}
sh openmetadata-ops.sh migrate
```Reindex data into the search engine:```bash theme={null}
sh openmetadata-ops.sh reindex
```> [card] [Troubleshooting](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/docker-troubleshooting.md)
>
> Resolve common permission and configuration issues after upgrading on Docker.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.