Backup Axonserver deployed in Kubernetes


I have a single node Axon Server SE 4.5 deployment in kubernetes environment. I’m trying to figure out how backup/restore functionality is working. I try to post a request to “/createControlDbBackup” endpoint and I’m getting a filename in response. Unfortunately no such file is generated in the storage volume mounted to the k8s pod. Would you suggest how I can reach that file? Also what is the procedure to restore that file into a new Axon Server SE installation.

Thank you,

Hi Paco!

To start with the location of the backup file, you can control that using “axoniq.axonserver.controldb-backup-location”, which has a default of “.”, placing the ZIP file in the current working directory of Axon Server.

For restoration of servers using backups, you’ll need access to the Persistent Volume, as I discussed in “Revisiting Axon Server in Containers”. This is a definite worrying point for Kubernetes-based deployments, especially if the volume was created automagically. Please also mind the default Kubernetes behavior that such a volume will be deleted together with the StatefulSet, which can trip you up in case of a full rebuild of the deployment. What works reasonably well is to use your cluster provider’s facilities for disk snapshots, and metadata values in the PVC to link an existing disk rather than create an automatic one. This means you need to spend a bit more attention on your sizing adjustments and disaster recovery scenarios, but you gain more control over the result.

Naturally, I cannot refrain from mentioning that Axon Server Enterprise Edition has the option of building a cluster with backup nodes, but the costs for such a deployment need to be balanced against your requirements.


1 Like