Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy an Akka Persistence Cassandra database

We have a Lagom-based project with several microservices, each one (of course) with its own Cassandra keyspace. We need to copy the production data to our qa and dev environments. In a traditional database we would simply export all of the production data and import it into the other environments. How is this done with Akka Persistence? Can I do the same thing (i.e. blow away all dev/qa data and import from a production backup? Or will this not work?

like image 946
Mario Camou Avatar asked Feb 03 '26 02:02

Mario Camou


1 Answers

Yes, you can!

The most interesting part, assuming that everything is eventsourced, is that you only need to copy your events table. Everything else will be build from projections on startup.

We do it very often when we want to check event migrations, debug something or even before big releases.

like image 85
Denis Mikhaylov Avatar answered Feb 04 '26 17:02

Denis Mikhaylov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!