You can take a backup of Cloud Native VMware BMA instance.

You must have the secret, mysql password, and minio password of the VMware BMA instance you want to back up.

Procedure

  1. Run the following commands to retrieve the secret, mysql password, and minio password of the VMware BMA instance.
    bma_secrets_secret=$(kubectl get secret -n <namespace> -l 'app.kubernetes.io/managed-by'=Helm | grep pliant-secrets | awk '{print $1}')
    mysqlp=$(kubectl get secret -n <namespace> $bma_secrets_secret -o json | jq -r .data[\"mysqldb-password\"] | base64 -d)
    miniop=$(kubectl get secret -n <namespace> $bma_secrets_secret -o json | jq -r .data[\"object-storage-secret-key\"] | base64 -d)
    
    In the following example,
    • bma-core is the namespace where VMware BMA core instance is running.
    • my_encryption_passphrase is the encryption key.
    • mybackupfile.tgz is the backup tar file.
     
    [ ~ ]$ bma_secrets_secret=$(kubectl get secret -n bma-core -l 'app.kubernetes.io/managed-by'=Helm | grep pliant-secrets | awk '{print $1}')
    [ ~ ]$ echo $bma_secrets_secret
    bma-core-pliant-secrets
    [ ~ ]$ mysqlp=$(kubectl get secret -n bma-core $bma_secrets_secret -o json | jq -r .data[\"mysqldb-password\"] | base64 -d)
    [ ~ ]$ echo $mysqlp
    A0fj2feMmI9b0juH1hF9Z8vsKEnBRhEM
    [ ~ ]$ miniop=$(kubectl get secret -n bma-core $bma_secrets_secret -o json | jq -r .data[\"object-storage-secret-key\"] | base64 -d)
    [ ~ ]$ echo $miniop
    O5RWfPCHXJCJhJih2KaTfAuRCQ50aztb
  2. Run the following command to take backup of the VMware BMA instance.
    kubectl exec -i $(kubectl get pods -n <namespace> |grep addon-toolbox | awk '{print$1}') -n <namespace> -- run-adhoc-backup.sh --MySQL_Password $mysqlp --Minio_Password $miniop  --Encryption_Key <passphrase> > <backupfilename.tgz>
    
    In the following example,
    • bma-core is the namespace where VMware BMA core instance is running.
    • my_encryption_passphrase is the encryption key.
    • mybackupfile.tgz is the backup tar file
    [ ~ ]$ kubectl exec -i $(kubectl get pods -n bma-core |grep addon-toolbox | awk '{print$1}') -n bma-core -- run-adhoc-backup.sh --MySQL_Password $mysqlp --Minio_Password $miniop  --Encryption_Key my_encryption_passphrase > mybackupfile.tgz
    jq: error (at <stdin>:119): Cannot iterate over null (null)
    gpg: directory '/root/.gnupg' created
    gpg: keybox '/root/.gnupg/pubring.kbx' created
    
    The backup file is created in the current working directory.