Rolling back an upgrade

If you want to roll back to a previous version of IBM RPA, follow the procedure.

Procedure

Note:IBM MQ does not support rollback. You can roll back an IBM RPA upgrade to a previous version without rolling back IBM MQ. If you need to rollback IBM MQ, delete the IBM RPA instance and the IBM MQ PersistentVolume and Persistent Volume Claims and install the previous version of IBM RPA.
  1. Backup all of your PersistentVolumes and the database before you start the rollback process in case you need to revert. See How to back up, clone, and migrate PVCs on OpenShift.

  2. Restore your database from the backup that you made before the upgrade.

  3. Set the replicas field to 0 in the IBM RPA CR. For example:

    apiVersion: rpa.automation.ibm.com/v1beta1
    kind: RoboticProcessAutomation
    metadata:
    name: rpa-sample
    spec:
    license:
        accept: true
    version: 1.21.0
    tls: {}
    api:
        externalConnection:
        secretName: rpa-db
        firstTenant:
        name: ibm
        owner:
            email: superuser@example.com
            name: superuser
        replicas: 0
        smtp:
        port: 587
        server: smtp.example.com
        userSecret:
            secretName: rpa-smtp
        storage: {}
    ui:
        replicas: 0
    ocr:
        replicas: 0
    
  4. Rollback the operand version from your current version to a previous version in the version field. For example, if your current version is 1.21.0, you can downgrade it to 1.20.0:

    apiVersion: rpa.automation.ibm.com/v1beta1
    kind: RoboticProcessAutomation
    metadata:
    name: rpa-sample
    spec:
    license:
        accept: true
    version: 1.20.0
    tls: {}
    api:
        externalConnection:
        secretName: rpa-db
        firstTenant:
        groupMappings:
            adminGroups: IBM Development
            superAdminsGroups: IBM Manager
            userGroups: IBM User
        name: ibm
        owner:
            email: superuser@example.com
            name: superuser
        replicas: 0
        smtp:
        port: 587
        server: smtp.example.com
        userSecret:
            secretName: rpa-smtp
        storage: {}
    ui:
        replicas: 0
    ocr:
        replicas: 0
    ```5. Wait for the RPA status to be Ready.
    
  5. Delete the <instance-name>-apiserver-rpa-redis secret:

    oc delete secret <instance-name>-apiserver-rpa-redis
    
  6. Set the 'replicas` field in the IBM RPA CR back to its previous value:

    apiVersion: rpa.automation.ibm.com/v1beta1
    kind: RoboticProcessAutomation
    metadata:
    name: rpa-sample
    spec:
    license:
        accept: true
    version: 1.20.0
    tls: {}
    api:
        externalConnection:
        secretName: rpa-db
        firstTenant:
        groupMappings:
            adminGroups: IBM Development
            superAdminsGroups: IBM Manager
            userGroups: IBM User
        name: ibm
        owner:
            email: superuser@example.com
            name: superuser
        replicas: 1
        smtp:
        port: 587
        server: smtp.example.com
        userSecret:
            secretName: rpa-smtp
        storage: {}
    ui:
        replicas: 1
    ocr:
        replicas: 1
    
  7. Delete the new deployment of the Redis operator:

    oc delete rediscp <instance-name>-rediscp-rpa
    
Important: The rollback process is unable to revert database schema changes made after the upgrade. Restoring a database backup during the rollback is essential to keep your server running and to avoid potential schema errors. Keep in mind that changes made after the upgrade will be lost after you restore your database backup.