A utility to migrate commits from between two persistence engines.
This works by hosting a source event store and a destination event store in seperate appdomains (so they can reference different versions of dependencies) and pulls commits from the source and puts them in the destination. To investigate how this works, clone the repo, open src\MigrateCommits.sln and run the MigrateCommits project. The utility uses in-memory stores.
- Clone the repo. You will need to make changes to it to suit your environment.
- Inspect the package dependencies in MigrateCommits.Source and MigrateCommits.Destination projects and ensure they match your environment.
- Modify
MigrateCommits.Source.SourceStore
to wireup to your source event store. - Modify
MigrateCommits.Destination.SourceStore
to wireup to your destination event store. - Important Add a reference to your events assembly in the MigrateCommits.Source and MigrateCommits.Destination projects so that headers and event bodies can be deserialized.
- Remove sample test code from
MigrateCommits.Destination.SourceStore
constructor.
It is assumed that your messages (events & headers) are marked [Serializable]
so they can be treansferred across appdomain boundaries. If they are not, either mark them as such, or, perform manual serialization & deserialization. To use custom serialization:
- Modify
MigrateCommits.Source.SourceStore
SerializeHeaders & SerializeBody methods to return serialized body & header values - Modify
MigrateCommits.Destination.SourceStore
DeserializeHeaders & DeserializeBody methods to return deserialized body & header values
- Backup everything first.
- Snapshots are not migrated. Just re-run your snapshot process on the destination store after migration.
Questions? Head over to the Google Group or Jabbr Room