Generating a manual backup of the management subsystem on OpenShift and Cloud Pak for Integration

You can generate a manual (non-scheduled) backup of the management subsystem in your OpenShift and Cloud Pak for Integration environments.

Procedure

  1. Make sure that the management cluster status is Running and the READY condition displays matching values before and after the "\".

    You can use either the OpenShift web console or the oc command line to verify the health. 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. Decide which of the two types of manual backups you want to do:
    • full: backs up the entire Management Subsystem database.
    • incr: backs up any data that has not been backed up since the last full or incr backup.
  3. You generate a backup manually by creating a managementBackup custom resource which is detected by the ibm-apiconnect operator that then triggers the backup process.

    You can create the ManagementBackup custom resource by using either the Form UI or the command line. For example:

    apiVersion: management.apiconnect.ibm.com/v1beta1
    kind: ManagementBackup
    metadata:
      generateName: mgmt
    spec:
      type: full
      crType: create
      clusterName: management

    Table 1. CR settings for manual backup
    Setting Description
    type The type of backup to be done. Valid arguments are:
    • full

      Backs up the entire Management subsystem database

    • incr

      Backs up any data that has not been backed up since the last full or incr backup.

    crType Use create to trigger a backup process.
    clusterName The name of the target ManagementCluster you want to backup.
  4. Create the ManagementBackup custom resource in the namespace of your Management Subsystem to trigger the backup process. Use the Form UI or the following command:
    $ oc create -f mgmtbackup_cr.yaml -n <APIC_namespace>
  5. (Optional): You can list current backups by using Form UI to list ManagementBackup resources, or by using oc:
    $ oc get managementbackup -n <APIC_namespace> --sort-by=.metadata.creationTimestamp

    Here is an example of some possible output:

    NAME                STATUS   ID                 CLUSTER   TYPE   CR TYPE   AGE
    m1-e46bbac4         Ready    20201023-183005F   m1        full   record    66m
    mgmt-backup-dnvxw   Ready    20201023-193137F   m1        full   create    9m37s
  6. (Optional): You can get a detailed view of a specific backup by using the command:
    $ oc get managementbackup <bup-name> -n <APIC_namespace> -o yaml

    Here is an example of some possible output:

    apiVersion: management.apiconnect.ibm.com/v1beta1
    kind: ManagementBackup
    metadata:
      creationTimestamp: "2020-10-23T18:34:11Z"
      generation: 1
      labels:
        app.kubernetes.io/instance: m1
        app.kubernetes.io/managed-by: ibm-apiconnect
        app.kubernetes.io/name: m1-e46bbac4
      name: m1-e46bbac4
      namespace: default
      resourceVersion: "6869"
      selfLink: /apis/management.apiconnect.ibm.com/v1beta1/namespaces/default/managementbackups/m1-e46bbac4
      uid: b7b6be9c-82d4-4737-984f-58584a3fe582
    spec:
      clusterName: m1
      crType: create
      type: full
    status:
      clusterName: m1-fbaa5be2-postgres
      conditions:
      - lastTransitionTime: "2020-10-23T18:34:11Z"
        reason: BackupFailed
        status: "False"
        type: Error
      - lastTransitionTime: "2020-10-23T18:34:11Z"
        reason: BackupPending
        status: "False"
        type: Pending
      - lastTransitionTime: "2020-10-23T18:34:11Z"
        message: Record of management backup complete
        reason: BackupComplete
        status: "True"
        type: Ready
      - lastTransitionTime: "2020-10-23T18:34:11Z"
        reason: BackupInProgress
        status: "False"
        type: Running
      - lastTransitionTime: "2020-10-23T18:34:11Z"
        reason: BackupStatusUnknown
        status: "False"
        type: Warning
      crType: ""
      id: 20201023-183005F
      info:
        id: 20201023-183005F
        range: 2020-10-23 18:30:05 +0000 UTC - 2020-10-23 18:31:22 +0000 UTC
        rangeEnd: 1603477882
        rangeStart: 1603477805
        size: 32.6 MB
        totalsize: 32.6 MB
        type: full
      phase: Ready
      state: ""
      subsysName: m1
  7. Version 10.0.1.0 only: If a local-backup was performed on v10.0.1.0, and you now wish to upload the local-backup file to an sftp server, see Uploading backup files to an sftp server for the required steps.