Standard Upgrade

The current instructions refer to the standard upgrade procedure. Additional steps might be required, please refer to release notes.

Upgrade the horizon installation

You must retrieve the latest Horizon RPM from the EverTrust repository manually using the user credentials you were provided.

Access the server through SSH with an account with administrative privileges.

Install the Horizon package with the following command:

$ yum install horizon-2.5.X-1.noarch.rpm

Upgrade the database schema

Some Horizon versions require that you run migration scripts against your database. Since version 2.1.0, Horizon comes bundled with an horizon-upgrade script that handles this migration logic.

Therefore, after each upgrade, you should run horizon-upgrade to check whether new migrations should be run.

Since 2.5.0, horizon-upgrade tool no longer supports mongo legacy shell. mongosh is now required.

Access the server through SSH with an account with administrative privileges.

Run the following command:

$ /opt/horizon/sbin/horizon-upgrade -t <target version>

In most cases, horizon-upgrade can detect the version you’re upgrading from by checking the database. However, when upgrading from version prior to 2.1.0, you will encounter the following error:

*** Unable to infer the source version from your database. Specify it explicitly with the -s flag. ***

You’ll have to explicitly tell horizon-upgrade which version you are upgrading from. To do that, simply set the source version explicitly with the -s flag:

$ /opt/horizon/sbin/horizon-upgrade -t <target version> -s <source version>

Similarly, horizon-upgrade will try to use the MongoDB URI that was configured by the Horizon configuration utility. If it fails to auto-detect your database URI or you wish to migrate another database, specify the URI explicitly using the -m flag:

$ /opt/horizon/sbin/horizon-upgrade -t <target version> -m "<mongo uri>"

The upgrade script requires a MongoDB client to connect to your database (either mongo or mongosh). If no client is installed on the host where Horizon is running, consider installing the standalone mongosh client or running the upgrade script from another host that has access to the database.