8.8. Good Migration Practices¶
Iroha maintainers often receive questions about the best ways to migrate projects to new versions of Iroha, so we decided to share our practices that worked the best for us and our projects.
On an example of a 4 peer network we will go through a migration procedure (also moving from PostgeSQL database to RocksDB) that turned out to be the most stable and reliable in our projects.
8.8.1. Here are the steps:¶
- You have the 4 nodes running Iroha with the old version on Postgres
- Follow the instructions on Iroha Database migration. Copy the RocksDB folder. Skip this step if you do not need to switch between Postgres and RocksDB
- Add a new peer running the new version of Iroha using the Add Peer command and with the RocksDB folder on it.
- Add similar nodes 2 more times
- Now you have 7 nodes – 4 running the old version and 3 running the new one
- Switch off the first node with the old version and update this node with the same key pair to the new version (with RocksDB, if that is your goal)
- Repeat this for every node with the old Iroha version
- Now you can remove the “new” nodes and continue the work on your project!