Generating a manual backup of the management subsystem ( or later)

You can generate a manual (non-scheduled) backup of the management subsystem


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

    For example:

    kubectl get mgmt
    mgmt   16/16   Running   10.0.1-eus       19h
    Note: Be sure READY status is 16/16. If you have just configured or reconfigured the backup settings, there is a period of time when the postgres pods are taken offline and brought back up with the new configuration. During this time, the READY condition might not display the full number of pods. If you start a backup before the Management cluster is completely READY, the backup attempt might stall indefinitely.
  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 use mgmtbackup_cr.yaml in the helper_files directory as an example:

    kind: ManagementBackup
      generateName: management-
      type: full
      crType: create
      clusterName: management

    Table 1 lists the CR settings for a manual backup.

    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:
    $ kubectl create -f mgmtbackup_cr.yaml -n <namespace-of-mgmt-subsystem>
  5. (Optional): You can list current backups by using the command:
    $ kubectl get managementbackup -n <namespace-of-mgmt-subsystem> --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:
    $ kubectl get managementbackup <bup-name> -n <namespace-of-mgmt-subsystem> -o yaml

    Here is an example of some possible output:

    kind: ManagementBackup
      creationTimestamp: "2020-10-23T18:34:11Z"
      generation: 1
      labels: m1 ibm-apiconnect m1-e46bbac4
      name: m1-e46bbac4
      namespace: default
      resourceVersion: "6869"
      selfLink: /apis/
      uid: b7b6be9c-82d4-4737-984f-58584a3fe582
      clusterName: m1
      crType: record
      type: full
      clusterName: m1-fbaa5be2-postgres
      - 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
        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