Reconfiguring or adding backup settings after installation of the management subsystem on OpenShift and Cloud Pak for Integration

You can reconfigure the backup settings after installation of the management subsystem on OpenShift and Cloud Pak for Integration.

About this task

Backup configurations under management.databaseBackup in APIConnectCluster instance can be modified using Form UI (OpenShift) or Platform Navigator (Cloud Pak for Integration), or by using the command line utility oc.

Note:

When using a graphical interface (OpenShift web console, or Cloud Pak Platform Navigator) the GUI can prevent updates because APIConnectCluster CR refreshes very quickly. If you encounter this problem, use the command line to modify backup configurations:

oc edit apiconnectcluster <name-of-instance>

Procedure

  1. Make sure that the management cluster status is Running and the READY condition displays the same value before and after the "/".

    For example:

    oc get mgmt
    NAME   READY   STATUS    VERSION      RECONCILED VERSION   AGE
    mgmt   16/16   Running   10.0.1-eus   10.0.1.1-eus-0-eus       19h
  2. Create backup secret for your backup type. See the appropriate instructions:
  3. Complete the following steps, based on your storage type:
    • S3 storage

      In 10.0.1.0-eus and greater, you can change or add the DatabaseBackup s3 configuration via the Management section of the API Connect Cluster CR after a fresh install. However, doing so requires a reconfiguration of the database and a brief downtime. The operator restarts the database with the new backup configurations as soon as the new configuration in the management CR is saved.

      If you have a two data center disaster recovery deployment, before you configure S3 backup settings you must first disable 2DCDR on both sites. Follow these steps:
      1. Remove the multiSiteHA section from the spec section of the management CRs on both data centers. Take note of which data center is the active and which is the passive. Keep a copy of the multiSiteHA sections that you remove.
      2. Configure your S3 backup settings. You must specify different backup locations for each data center, see Backup and restore considerations for a two data center deployment.
      3. Add the multiSiteHA sections back to the management CRs in both data centers, ensuring that your original active is set to be the active again.
      spec:
        management:
          databaseBackup:
            protocol: objstore
            s3provider: ibm
            host: s3.eu-gb.cloud-object-storage.appdomain.cloud/eu-standard
            path: apic-backup
            credentials: mgmt-backup-secret
            schedule: "0 3 * * *"
            restartDB:
              accept: true
      Note: Version 10.0.1.0-eus only: The CR entry does not contain the protocol setting:
      
      databaseBackup:
        s3provider: ibm
        host: s3.eu-gb.cloud-object-storage.appdomain.cloud/eu-standard
        path: apic-backup
        credentials: mgmt-backup-secret
        schedule: "0 3 * * *"
        restartDB:
          accept: true

      Configuration of s3 backups uses a new parameter restartDB that is required when changing the backup configuration. restartDB is not required for initial deployments, only for modifications after the cluster is deployed.

      Table 1. Additional parameter for S3 backup type reconfiguration
      Parameter Description
      restartDB:
         accept: <value>
      Required when changing the backup configuration. The parameter accept is a boolen: <value> can be true or false.
      When accept is true, and a new configuration for management CR is saved, the operator:
      1. Stops the database and any dependent services
      2. Applies the change
      3. Restarts the stopped components.
      Note: restartDB is not required for initial deployments, only for modifications after the cluster is deployed.
      Note: Reconfiguration on 10.0.1.0-eus only:

      The operator must create an upgrade CR, because the postgres database is re-created as part of database backup configuration change. The new upgrade CR goes to Complete as soon postgres comes up.

      Example: When you change database backup configurations after upgrading API Connect from 10.0.0.0-ifix2 to v10.0.1.0, the operator restarts the postgres database-related components. The operator also creates an upgrade CR, and reaches the Complete state as soon as all postgres database components (pgbouncer, postgres database) are in Running state:

      NAME                                                            STATUS     MESSAGE                                                    A
      GE
      managementdbupgrade.management.apiconnect.ibm.com/m1-up-g6lcb   Complete   Upgrade is Complete (DB Schema/data are up-to-date)        1
      6m
      managementdbupgrade.management.apiconnect.ibm.com/m1-up-zqkk5   Complete   Fresh install is Complete (DB Schema/data are up-to-date)
      63s5s
      
    • SFTP (Version 10.0.1.1-eus or greater only)

      In 10.0.1.1-eus and greater, you can change/add the DatabaseBackup SFTP configuration via the Management section of the API Connect Cluster CR after a fresh install. This process does not involve any downtime. The same backup settings are used for reconfiguring as for initial configuration. For complete description of backup settings, see Configuring SFTP backup settings for a fresh install of the Management subsystem on OpenShift or Cloud Pak for Integration.

      spec:
        management:
          databaseBackup:      
            protocol: sftp
            host: <SFTP-hostname>
            port: <SFTP-port> (Optional, default is 22)
            path: apic-backup
            retries: 0
            credentials: mgmt-backup-secret
            schedule: "0 3 * * *"
      
      Workaround for reconfiguring from S3 to SFTP on 10.0.1.2-eus plus any iFixes

      When switching from S3 to SFTP storage, the s3provider field remains in the CR after switching the protocol, which can prevent the cluster from coming up. To workaround this issue, complete the following steps:

      1. Edit the CR file:
        oc edit mgmt -oyaml
      2. Remove the s3provider field under spec.management.databaseBackup
      3. Ensure that restartDB is set to true
              restartDB:
                accept: true
        
      Note: Handling of SFTP backup taken on 10.0.1.0.

      In 10.0.1.0, you can manually send backup tar files to an SFTP server, as described in Uploading backup files to an sftp server.

      You can upgrade from 10.0.1.0 to 10.0.1.1-eus, and configure SFTP backup settings, as described previously in SFTP.

      API Connect resyncs upstream SFTP backups and creates relevant backup CRs of type record.

      Note that the latest local backup is also automatically uploaded to the SFTP server if it was not uploaded to SFTP in 10.0.1.0.