> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/archive/generic/hivel-on-premises-deployment-guide-generic/13.-upgrade-and-rollback.md).

# 13. Upgrade and Rollback

How you learn a new version is available: Hivel does not currently offer a public changelog or self-serve browsing of its ECR registry. Check with your Hivel contact, or email <support@hivel.ai>, to confirm when a new image tag is available and which services it touches before planning an upgrade window.

**Pre-upgrade checks:**

1. Take a fresh backup of the database first - see Backup and Restore above. Don't start an upgrade on the assumption that your last scheduled backup is still current.

**Upgrade steps:**

1. Stop services on both servers: `./deploy.sh --stop`
2. Pull the new image tag(s) that Hivel has instructed you to use: `./deploy.sh --update`
3. If Hivel indicates the release ships a new database migration, re-run flyway-migration using the root/master database credentials, following the same steps as Database Migration - skip this step if Hivel confirms the release has no new migration.
4. Restart services in the same order used for initial deployment - VM1 first (./deploy.sh --vm1 or --start), then VM2.
5. Re-run the Validation Checklist in Verification and Access to confirm the upgrade succeeded before considering it complete.

**Rollback procedure:** if the upgrade fails, revert to the previous image tag and redeploy (`./deploy.sh --update` pointed at the prior tag, followed by `./deploy.sh --restart`). If the release included a database migration, reverting the image alone is not enough - Flyway migrations are not easily reversed, so you may need to restore the pre-upgrade backup taken above. Contact Hivel support before attempting to roll back a release that shipped a migration.

**Note:** `./deploy.sh --update` (see Available deploy.sh Commands) covers pulling new images, but a specific release may require additional steps beyond that - confirm with your Hivel support contact at the time of the upgrade whether anything else applies to your release.

<br>

{% columns %}
{% column %} <a href="/archive/generic/hivel-on-premises-deployment-guide-generic/12.-backup-and-restore.md" class="button primary" data-icon="backward">Backup and Restore</a>
{% endcolumn %}

{% column %}

{% endcolumn %}

{% column %} <a href="/archive/generic/hivel-on-premises-deployment-guide-generic/14.-uninstall-and-cleanup.md" class="button primary" data-icon="forward">Uninstall and Cleanup</a>
{% endcolumn %}
{% endcolumns %}
