2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								title: Upgrade on Docker
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								slug: /deployment/upgrade/docker
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# 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.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 21:59:41 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% note %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								You can find more details about Docker deployment [here ](/deployment/docker )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 21:59:41 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% /note %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Below we have highlighted the steps needed to upgrade to the latest version with Docker. Make sure to also look [here ](/deployment/upgrade/versions/013-to-100 ) for the specific details related to upgrading to 1.0.0
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-27 13:52:09 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% note noteType="Warning" %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								It is advised to go through [openmetadata release notes ](/deployment/upgrade#breaking-changes-from-0130-release ) before starting the upgrade process.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 21:59:41 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% /note %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-24 19:42:24 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Upgrade from 0.13 to 1.0.0
  
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-24 19:42:24 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Your production deployment should go from stable version to stable version. This translated to moving from 0.13 to 1.0.0 to get the latest stable OpenMetadata release.
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Let's go through the required steps:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### 1. Backup Existing OpenMetadata Data using Metadata CLI
  
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Make sure your instance is connected to the Database server 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Create a virtual environment to install an upgraded `metadata`  version to run the backup command: 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    python -m venv venv
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    source venv/bin/activate
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    pip install openmetadata-ingestion~=1.0.0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Validate the installed `metadata`  version with `python -m metadata --version` , which should tell us that we are 
						 
					
						
							
								
									
										
										
										
											2023-04-24 19:42:24 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   indeed at 1.0.0. Notice the `python -m metadata`  vs. `metadata` .
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Run the backup usi ng the updated `metadata`  CLI: 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    python -m metadata backup -u openmetadata_user -p openmetadata_password -H mysql -d openmetadata_db --port 3306
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   if using Postgres:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    python -m metadata backup -u openmetadata_user -p openmetadata_password -H postgresql -d openmetadata_db --port 5432 -s public
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  This will generate the .sql file which can be used for the backup 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   In our case, the backup file was named `openmetadata_202212201528_backup.sql` . You can copy the name from the backup
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   command output.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### 2. Replace the docker compose file
  
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Stop the running compose deployment with below command  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								docker compose down
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Download the Docker Compose Service File from OpenMetadata Github Release page [here ](https://github.com/open-metadata/OpenMetadata/releases/latest ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Replace the existing Docker Compose Service File with the one downloaded from the above step 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% note %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Please make sure to go through [breaking changes and release highlights ](/deployment/upgrade/versions/013-to-100 ).
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% /note %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Start the Docker Compose Service with the below command 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								docker compose -f docker-compose.yml up -d
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### 3. Re-index all your metadata
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-27 03:56:25 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Go to Settings -> OpenMetadata -> Search
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% image src="/images/v1.0.0/deployment/upgrade/elasticsearch-re-index.png" alt="create-project" caption="Reindex" /%}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Click on reindex all.
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								In the dialog box choose Recreate Indexes to All.
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% image src="/images/v1.0.0/deployment/upgrade/reindex-ES.png" alt="create-project" caption="Reindex" /%}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Upgrade ingestion patch versions
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								During the release lifespan we may publish new patch versions of `openmetadata-ingestion` . If you deployed
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								the ingestion container and require one of the fixes or improvements from a new patch release, there's usually no need
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								to re-deploy the full ingestion container.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 21:59:41 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% note %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Note that this process will only work if we are moving from PATCH versions. For example: `0.13.1.1`  -> `0.13.1.2` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								This method won't work when upgrading from `0.13.1.X`  -> `0.13.2.X` , as that will also require to upgrade the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								server version.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 21:59:41 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% /note %}
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The steps to follow are:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-27 03:56:25 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Connect to the ingestion container. If using our docker compose files or `metadata docker`  CLI, this translates to 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     docker exec -it openmetadata_ingestion bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Validate your `metadata`  version via ```metadata --version` ``. You will get back something like: 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   ```
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   metadata 0.13.1.5 from /home/airflow/.local/lib/python3.9 (python 3.9)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   ```
							 
						 
					
						
							
								
									
										
										
										
											2023-04-27 03:56:25 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Upgrade the `openmetadata-ingestion`  package via ```pip install "openmetadata-ingestion==0.13.1.X"` ``,for example, 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   pip install "openmetadata-ingestion==0.13.1.7" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   You can find the list of all released versions of
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   the `openmetadata-ingestion`  package [here ](https://pypi.org/project/openmetadata-ingestion/#history ).
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Exit the container by typing `exit` . 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Restart the ingestion container with `docker restart openmetadata_ingestion` . This will need a few minutes to 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								   to stop the container and start it again. Now, Airflow will start with the upgraded `metadata`  version.
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 19:26:38 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Connect to the ingestion container and validate the `metadata`  version: 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    docker exec -it openmetadata_ingestion bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
									
										
										
										
											2023-04-27 03:56:25 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								   -  ```metadata version` ``: where we expect to get the same version that was previously installed.
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Troubleshooting
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-27 03:56:25 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								#### Permission Denied when running  ```metadata openmetadata-imports-migration```
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								If you have a `Permission Denied`  error thrown when running ```metadata openmetadata-imports-migration --change-config-file-path` `` you might need to change the permission on the ` /opt/airflow/dags` folder. SSH into the ingestion container and check the permission on the folder running the below commands
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 16:45:47 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ls -l /opt/airflow
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ls -l /opt/airflow/dags
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								both the `dags`  folder and the files inside `dags/`  should have `airflow root`  permission. if this is not the case simply run the below command
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								chown -R airflow:root /opt/airflow/dags
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#### Broken DAGs can't load config file: Permission Denied
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								You might need to change the permission on the `/opt/airflow/dag_generated_config`  folder. SSH into the ingestion container and check the permission on the folder running the below commands
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ls -l /opt/airflow
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ls -l /opt/airflow/dag_generated_config
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								both the `dags`  folder and the files inside `dags/`  should have `airflow root`  permission. if this is not the case simply run the below command
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								chown -R airflow:root /opt/airflow/dag_generated_config
							 
						 
					
						
							
								
									
										
										
										
											2023-04-27 03:56:25 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```