Backing up DevOps Loop data

You can back up DevOps Loop by using Velero and Minio to support disaster recovery and upgrade scenarios.

Before you begin

You must have completed the following tasks:

  • Ensured that all DevOps Loop services are running and in a healthy state.
  • Gained administrative privileges.
  • Installed Velero and configured with an S3-compatible storage backend (MinIO or AWS S3). See Tools supporting backup and restoration.
  • Locally saved the Helm values for your current DevOps Loop deployment.

About this task

DevOps Loop utilizes both block and file storage, allowing the back up process to support CSI snapshots and fs-volume backups.

Important:If DevOps Loop pods that use file storage for fs-volume backups are not labeled, Velero will not include their data in the backup, which could result in incomplete or inconsistent backup data.

Procedure

  1. Run the following command to label DevOps Loop pods that use file storage for fs-volume backups:
    ./ibm-devops-loop/scripts/backup-restore/annotate-pods.sh
    Note: If your DevOps Loop deployment only uses block storage volumes (CSI snapshots), you can skip this step.
  2. Export the Helm configuration of your DevOps Loop deployment to a local file by running the following command:
    helm get values devops-loop -n devops-loop > devops-loop-values-backup.yaml
  3. Run a Velero backup of the DevOps Loop namespace, including PVCs, PVs, and Secrets, using the following command:
    velero backup create devops-loop-backup \
      --include-namespaces devops-loop \
      --include-resources persistentvolumeclaims,persistentvolumes,secrets \
      -n velero
  4. Run the following command to verify the backup status to ensure it completed successfully:
    velero backup describe devops-loop-backup --details
  5. Optional Backup any external databases with their native backup tools to ensure data consistency.
  6. Optional: Check the status and logs of your restore jobs to troubleshoot any issues:
    # Check backup status
    velero get backup
    
    # Describe specific backup
    velero describe backup <backup-name>
    
    # View backup logs
    velero backup logs <backup-name>
    

Results

You have created a backup of the DevOps Loop namespace and Helm values for disaster recovery or upgrade scenarios.