Skip to main content
Version: Deploy 24.1

Backup of the Deploy before backup

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

PostgreSQL backup example

  1. Get the postgres user passwords:
# get xld user password
kubectl get secret --namespace digitalai dai-xld-digitalai-deploy -o jsonpath="{.data.mainDatabasePassword}" | base64 --decode; echo
# get xld-report user password
kubectl get secret --namespace digitalai dai-xld-digitalai-deploy -o jsonpath="{.data.reportDatabasePassword}" | base64 --decode; echo
  1. Back up your database installation, ssh to PostgreSQL pod:
# main DB
kubectl exec dai-xld-postgresql-0 -c postgresql -q -i -n digitalai -- \
pg_dump -p 5432 -h localhost -U xld -W xld-db | gzip > xld-db-$(date +'%Y-%m-%d-%H-%M-%S').sql.gz
# report DB
kubectl exec dai-xld-postgresql-0 -c postgresql -q -i -n digitalai -- \
pg_dump -p 5432 -h localhost -U xld-report -W xld-report-db | gzip > xld-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 centralConfiguration configuration
kubectl exec -n digitalai dai-xld-digitalai-deploy-cc-server-0 -c deploy -- \
tar -cf - /opt/xebialabs/central-configuration-server/centralConfiguration > centralConfiguration-conf-$(date +'%Y-%m-%d-%H-%M-%S').tar.gz
# backup master configuration
kubectl exec -n digitalai dai-xld-digitalai-deploy-master-0 -c deploy-master -- \
tar -cf - /opt/xebialabs/xl-deploy-server/conf > master-conf-$(date +'%Y-%m-%d-%H-%M-%S').tar.gz
# backup worker configuration
kubectl exec -n digitalai dai-xld-digitalai-deploy-worker-0 -c deploy-worker -- \
tar -cf - /opt/xebialabs/deploy-task-engine/conf > worker-conf-$(date +'%Y-%m-%d-%H-%M-%S').tar.gz

Similar way following folders can be backed on the master or worker:

  • ext;
  • hotfix;
  • work. or on the centralConfiguration:
  • conf.