Upgrade Instructions - GCP (4.2)

This section describes the standard upgrade procedure for upgrading Usage Engine on Google Cloud Platform. This procedure should be used to ensure that configurations, persisted data (in the file system or database), and system properties are properly migrated. Workflows will be interrupted shortly at the restart of the ECDs. These instructions will also describe how the timing of the restart of ECDs running non-scalable real-time workflows can be controlled by enabling manual upgrade.

Note!

The instructions for backup and upgrade of the database are only valid for Postgresql as platform database since Oracle and SAP HANA are not supported as hosted databases in GCP. If the platform database used is Derby, the backup of the file store covers the database as well (assuming persistent storage of the platform is enabled).

Backup the database by following these steps:

  1. List the databases and locate the one used for Usage Engine:

    gcloud sql instances list
  2. Perform a backup of the database by running the following command:

    gcloud sql backups create --instance=<database instance name> --location=<region> --description=<optional description of backup>

    For example:

    gcloud sql backups create --instance=usage-engine-system-db --location=europe-north1 --description="Backup before upgrade"

    The next step is to do a backup of the filestore used. If there are standalone ECs that still running and writing to their logs to the same filestore, any events ocurring after the initiation of the backup will not be included in the backup.

  3. List your file stores to get the relevant information for the backup:

  4. Perform a backup of the file stores by running the following command:

    For example:

    If you need to upgrade the platform database in connection with the Usage Engine upgrade, then this is a good time to do that since the database is already shut down for the backup. First check in the Cloud SQL page in the Google Cloud Console which versions are available, and find what version matches what the Usage Engine Private Edition version you’re upgrading to supports.

Upgrade the database by running the following command (where “POSTGRES_15” is the target version) :

 

Restore database backup

And restore:

Restore filestore

To restore the filestore:

For example: