# Updating Structural

For a Kubernetes deployment, **Structural Settings** view includes an option to update to the latest version of Tonic Structural.

For a Docker deployment, you use `docker-compose` commands to get the latest version.

## Backing up the Structural application database

Before you upgrade Structural, make sure to create a backup of the Structural application database.

Without a snapshot of the application database, if the upgrade is unsuccessful, you will not be able to downgrade to the previous version.

## Updating a Kubernetes deployment

### Kubernetes setup

Before you update Structural, we suggest that you do the following:

* Have a system to regularly back up your Structural PostgreSQL application database.
* Verify that the Kubernetes environment has access to [quay.io](https://quay.io/).\
  \
  If you run Structural in an air-gapped environment, or if you re-hosted the images from [quay.io](https://quay.io/), make sure that **values.yaml** reflects this change, and that you have updated your local repository with the latest version from [quay.io](https://quay.io/).\
  \
  To view the current latest release version, go to the [Structural release notes](https://www.tonic.ai/product-release-notes/structural).
* Update your helm charts to use the `latest` tag.\
  \
  If you manage your helm charts in a repository that has a pinned version tag, then when you redeploy from your helm charts, Structural reverts to the pinned version tag.
* Make sure that you have [set up host integration](https://docs.tonic.ai/app/admin/on-premise-deployment/setting-up-host-integration).

### Allowing Structural to retrieve information about the latest version <a href="#tonic-updating-allowlist-for-version-info" id="tonic-updating-allowlist-for-version-info"></a>

Before it can enable the update option, Structural must be able to retrieve information about the latest Structural version.

To support this, you must allowlist the following URLs:

* <https://temp-tonic-release.s3.amazonaws.com/version.txt>
* <https://temp-tonic-release.s3.amazonaws.com/?prefix=version.txt>

### Completing the update

{% hint style="info" %}
**Required global permission:** Update Tonic Structural
{% endhint %}

Before you launch an update:

* Verify that there is enough system space for a second instance of the Structural application.\
  \
  While the new instance starts, the original instance is still live.\
  \
  Once the new instance is running, the original is removed and the resources are freed up.
* Check the [release notes](https://www.tonic.ai/product-release-notes/structural) for any updates that might impact your configuration.

The option to update Structural is on the **System Status** tab of **Structural Settings** view.

To display **Structural Settings** view, in the Structural heading, click **Structural Settings**.

On the **System Status** tab, if you can update Structural, a blue **Update to&#x20;*****\<version**>* button displays. The button is only available if Structural is not on the most recent version. For information on how to update to a specific version other than the latest version, go to [#update](https://docs.tonic.ai/app/on-premise-deployment/deploying-with-helm#update "mention").

You cannot start the update if Structural jobs are running or are queued to run.

After you start the update, do not start other jobs until the update is complete.

You are given an estimated down time when you start the update, but the update typically takes less than ten minutes.

Any jobs that start during update process are silently terminated. This could leave your destination database in an unexpected state. If this happens, rerun the jobs.

## Updating a Docker deployment

The update option on **Structural Settings** view is not available for instances that are hosted on Docker.

To update Structural, you [issue Docker commands](https://docs.tonic.ai/app/on-premise-deployment/deploying-with-docker-compose#update).
