How to archieve event store

Team,
We have been using axon framework for about an year and half and lately we have noticed that our event store has 400 million events. We are planning to archieve the whole event store and need your inputs on how to do it and what precautions we need to take.
The first thing we want to do is to create a force snapshot for each aggregate id and then do a backup of the evntstore and clear the whole collection. Now what is bothering is what will happen if the structure of an aggregate is changed?

Thankk you

Hi,

which EventStore implementation do you use?

There are different ways of archiving. If your events remain “operationally accessible”, you could still source aggregates from your archived events, but it might just be somewhat slower. If archiving also means taking “offline”, then you will need to make sure your aggregates will always be “sourceable” from your snapshots. In case of structural changes in your Aggregates, this may mean that you need to create upcasters for your snapshots, too.

Kind regards,

Thank you for your response.
We are using mongo for our event storage. Also, we are planning to remain the events operationally accessible which makes me think

–how to connect to two event stores ? do we need to write our own custom repository ??

Hi,

Axon has an implementation called SequenceEventStorageEngine, which allows multiple storage engines to be concatenated, but it is somewhat “aggressive” on loading events from the historic tables. If you expect most of the data to always come from the operational database, then a slight variation of this implementation that attempts to load from “operational” first, and only take from “historic” what’s missing would be more efficient.

Cheers,