Skip to main content
Version: Release 25.3

Backup of the Release before upgrade

This document provides procedures for backing up the Digital.ai Release installation on a Kubernetes (K8s) cluster. Follow these steps to ensure your data and configuration are protected before performing upgrades or maintenance.

Backing Up PostgreSQL Databases

  1. Retrieve PostgreSQL user passwords.
# Retrieve xlr user password
kubectl get secret --namespace digitalai dai-xlr-digitalai-release -o jsonpath="{.data.mainDatabasePassword}" | base64 --decode; echo
# Retrieve xlr-report user password
kubectl get secret --namespace digitalai dai-xlr-digitalai-release -o jsonpath="{.data.reportDatabasePassword}" | base64 --decode; echo
  1. Back Up the database.

    Connect to the PostgreSQL pod and run the following commands to create compressed backups of the main and report databases:

    # Back up main database
    kubectl exec dai-xlr-postgresql-0 -c postgresql -q -i -n digitalai -- \
    pg_dump -p 5432 -h localhost -U xlr -W xlr-db | gzip > xlr-db-$(date +'%Y-%m-%d-%H-%M-%S').sql.gz
    # Back up report database
    kubectl exec dai-xlr-postgresql-0 -c postgresql -q -i -n digitalai -- \
    pg_dump -p 5432 -h localhost -U xlr-report -W xlr-report-db | gzip > xlr-report-db-$(date +'%Y-%m-%d-%H-%M-%S').sql.gz

    Backup files are saved to the current working directory on the local host. Ensure sufficient free space is available for the backup data.

  2. To decompress the backup files, use:

    gunzip <filename>.sql.gz

Backing Up Configuration Folders

# Back up Release configuration folder
kubectl exec -n digitalai dai-xlr-digitalai-release-0 -c release -- \
tar -cf - /opt/xebialabs/xl-release-server/conf > release-conf-$(date +'%Y-%m-%d-%H-%M-%S').tar.gz

You can use a similar approach to back up the following folders on the Release server:

  • ext
  • hotfix
  • reports

Release Backup – Best Practices and Guidelines

A comprehensive backup strategy is essential to prevent data loss and maintain business continuity in Digital.ai Release environments.

note

The following best practices are common recommendations and general guidelines. They should not be considered exhaustive or universally applicable. Carefully review, consider, and customize these practices to fit your organization's specific infrastructure, operational requirements, and compliance needs.

Identify Critical Components for Backup

  • Database: Include both the repository and archive databases in your backup plan.
  • Filesystem: Back up the conf, ext, and hotfix directories. For Kubernetes deployments, version-control configuration files and custom resources.

Choose an Appropriate Backup Strategy

  • Select a backup frequency and method that balances data protection, operational impact, and storage use.
  • Two common strategies:
    • Strategy One: Weekly full backup (system down), daily incremental database backups (system live), hourly database snapshots.
    • Strategy Two: Monthly full backup (system down), weekly incremental database backups (system live), daily database snapshots.
  • Choose one of the above strategies based on storage, database setup, and acceptable risk.
note

Review and update backup strategies regularly as your environment or business needs change. Select a strategy that fits your storage capacity and database setup. Using clustered databases or storing data in multiple locations can further minimize the risk of data loss while balancing backup frequency, storage costs, and operational requirements.

Minimize Downtime and Data Loss

  • Full backups with the system down ensure data integrity but may not be practical for all organizations.
  • Incremental and snapshot backups can be performed while the system is live, with minimal risk of data inconsistency.

Automate and Monitor Backups

  • Use automated tools and scheduling for reliable backups.
  • Monitor backup jobs and regularly verify backup integrity with test restores.

Store Backups Securely

  • Store backups in multiple secure locations (on-premises and/or cloud).
  • Encrypt backup data and restrict access.

Document and Test Recovery Procedures

  • Keep clear documentation of backup and restore procedures.
  • Test recovery from backups regularly to ensure effectiveness.

Customize for Your Environment

  • Adjust these guidelines for your infrastructure, compliance, and operational needs.
  • Consult Digital.ai support or your database administrator for site-specific advice.