Skip to main content
Version: Release 24.1

Backup of the Release before upgrade

Here are some examples how to backup the content of the Release installation on K8s cluster.

PostgreSQL backup example

  1. Get the postgres user passwords:
# get xlr user password
kubectl get secret --namespace digitalai dai-xlr-digitalai-release -o jsonpath="{.data.mainDatabasePassword}" | base64 --decode; echo
# get xlr-report user password
kubectl get secret --namespace digitalai dai-xlr-digitalai-release -o jsonpath="{.data.reportDatabasePassword}" | base64 --decode; echo
  1. Back up your database installation, ssh to PostgreSQL pod:
# main DB
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
# report DB
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

The files will be in the current working folder on the local host. Make sure that you have enough free space on the local host partition for the backup data.

To unzip the stored dump files use gunzip.

Backup of the configuration folders example

# backup release configuration
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

Similar way following folders can be backed on the Release server:

  • ext;
  • hotfix;
  • reports.