Restoring a backup or replaying events of a previous instance

Hello,

My question is regarding restoring a backup or replaying events of a previous instance. The use-case is we have 2 environments (staging, production) and when we do a Move To Production we would like to be able in some cases to just reset the services and restore a previous data state by either applying a backup or just replaying all the events from the previous instance on the new instance.

This would also make it possible to have instances where we can create integration tests by applying a specific backup of that service. For development this would also be interesting if we want to streamline certain flows and do some specific tests on our local machines.

To get to the actual question, is it possible to have some kind of backup/restore functionality in this manner?

Thanks in advance

What you’re describing is important functionality that Kalix needs, but we don’t offer it yet.

The best we can offer at the moment would be to export events to a Kafka topic that has no ttl, possibly wrapped in a protobuf message that has a oneof for each event type, and then have a command handler on the entity that when it receives the events, just persists them.

Hi James,

Until this functionality is present in Kalix is some way or another we’ll probably follow the proposal, as in our opinion it is the most simple and best way to provide such functionality at this point

Thanks for the fast feedback :smiley: