Using the Axon Backup controllers results in an empty list of filenames


We’re currently trying to make use of the Axon Server backup endpoints. The endpoint for the controldb backup works, for all our environments (servers). However, we cannot get the event/snapshot endpoint to work on any environment except production. On production, the response is a list of paths, as expected. On our other environments, the list is always empty even though these other environments definitely have lots of events.

The only difference between the environments that I can think of, is that we do not have Axon running in a container on production. Having said that, I also cannot get the endpoint to work locally, even if I run an Axon Server as a regular jar file instead of within a docker container.

Does anyone have any clue what might cause the backup endpoint to give an empty list - even through the Swagger ui?

Many thanks,

Hello Siemen,

the endpoint doesn’t return the filename of the file currently being written to. While it’s always safe to copy that file too, it’s filename shouldn’t be used as the “file last backed up” to prevent gaps in the backup. By default, we leave the file out. Could it be that you only have more than one file on the prod environment, and therefore only see the file names there?


Hi Allard,

Ah, that explains it, but in that case I have some follow-up questions.

I was under the impression that since the file currently being written to is potentially not in a safe state, the endpoint would generate a file/files at the time of the request, then give back the paths of whatever backup files it had generated. Is this incorrect? Also, if I do have only one file, can I not make any safe backups at all? I can only backup the files under the data folder?

In case everything is on fire :slight_smile: - can I restore a backup using only the files from the paths returned by the endpoint? So without that file that’s currently being written to?

Thanks again,

Hi Siemen,

the backup link for files doesn’t create copies of files. It will only list the files that you should include in a backup process. The file currently being written to is not included in the backup output listing. However, it is safe to copy that one too, even though it may contain partial writes. At startup, AxonServer will always evaluate that file and check which data it has, that was completely written. Any missing data can be reconstructed using the replication log (in AxonServer Enterprise).

The controlDB backup URL (which is not a GET, but a POST) creates a safe copy of the ControlDB (which stores operational configuration for the node/cluster), which is safe for copying. It returns the path of the file that was created.

Hope this helps.