> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/installation/upgrade-data-quality-observability-self-hosted/roll-back-data-quality-observability-self-hosted.md).

# Roll back Data Quality & Observability (self-hosted)

When an upgrade to Data Quality & Observability (self-hosted) causes issues, you can restore the previous version by rolling back the application components and, if schema migrations ran, the Metastore.

Every rollback involves two actions:

* **Application rollback:** restore the previous JARs or container image.
* **Metastore rollback:** restore the database to the pre-upgrade snapshot if Flyway schema migrations were applied.

{% hint style="warning" %}
Data Quality & Observability (self-hosted) uses Flyway for Metastore schema migrations. Flyway migrations are forward-only — there is no built-in undo. The application refuses to start if the database schema is ahead of the JAR version. A snapshot taken immediately before the upgrade is the only reliable rollback path for the Metastore. Always snapshot before upgrading.
{% endhint %}

## Pre-upgrade checklist

Complete this checklist before every upgrade. Without these backups, a rollback may not be possible.

{% stepper %}
{% step %}
Record the current version of each component.

```
ls -1 $OWL_BASE/owl/bin/dq-webapp-*.jar
ls -1 $OWL_BASE/owl/bin/dq-agent-*.jar
ls -1 $OWL_BASE/owl/bin/dq-core-*-with-dependencies.jar
```

{% endstep %}

{% step %}
Back up the Metastore.

```
pg_dump -h <METASTORE_HOST> -U <METASTORE_USER> -Fc owldb > owldb_backup_$(date +%Y%m%d_%H%M%S).dump
```

{% endstep %}

{% step %}
Back up the config directory.

```
cp -r $OWL_BASE/owl/config $OWL_BASE/owl/config_backup_$(date +%Y%m%d_%H%M%S)
```

{% endstep %}

{% step %}
Record the Flyway schema version.

```
psql -h <METASTORE_HOST> -U <METASTORE_USER> -d owldb \
  -c "SELECT version, description, installed_on FROM flyway_schema_history ORDER BY installed_rank DESC LIMIT 5;"
```

{% endstep %}
{% endstepper %}

## What's next

Select your deployment type to follow the rollback procedure:

* [Roll back a Spark standalone Data Quality & Observability (self-hosted) deployment](/data-quality-self-hosted/installation/upgrade-data-quality-observability-self-hosted/roll-back-data-quality-observability-self-hosted/roll-back-a-spark-standalone-data-quality-observability-self-hosted-deployment.md)
* [Roll back a Data Quality & Observability (self-hosted) deployment on Kubernetes](/data-quality-self-hosted/installation/upgrade-data-quality-observability-self-hosted/roll-back-data-quality-observability-self-hosted/roll-back-a-data-quality-observability-self-hosted-deployment-on-kubernetes.md)
* [Roll back a Data Quality & Observability (self-hosted) deployment on Amazon EMR](/data-quality-self-hosted/installation/upgrade-data-quality-observability-self-hosted/roll-back-data-quality-observability-self-hosted/roll-back-a-data-quality-observability-self-hosted-deployment-on-amazon-emr.md)
* [Roll back a Data Quality & Observability (self-hosted) deployment on Azure HDInsight](/data-quality-self-hosted/installation/upgrade-data-quality-observability-self-hosted/roll-back-data-quality-observability-self-hosted/roll-back-a-data-quality-observability-self-hosted-deployment-on-azure-hdinsight.md)
* [Roll back a Data Quality & Observability (self-hosted) deployment on Google Cloud Dataproc](/data-quality-self-hosted/installation/upgrade-data-quality-observability-self-hosted/roll-back-data-quality-observability-self-hosted/roll-back-a-data-quality-observability-self-hosted-deployment-on-google-cloud-dataproc.md)
