Migration from PRBv2 to v3
This guide will show you how to migrate a PRBv2 deployment to PRBv3 using Docker Compose.
Make sure it's running and the
wmshould be running and listening on port 3001 by default.
.ymlfile of PRBv2 and set the docker image of
phalanetwork/prb:git-current-v2to receive the bundled migration script.
lifecycle, the component’s docker-compose configuration file should be like:
# leave other things as is
sudo docker compose pull.
Your will see the
lifecycle should pull a new image and restart.
In the docker-compose folder of PRBv2's
docker compose down
# Change PRB3_API_ENDPOINT to your actual endpoint of prb3-wm
docker compose run -e "PRB3_API_ENDPOINT=http://127.0.0.1:3001" --entrypoint "yarn migrate_to_prb3" lifecycle
To stop the PRBv2 and to run the migration script.
There you should use the same endpoint of what you wrote in wm.yml to replace the `http://127.0.0.1:3001`.
Now the migration is done, click
Restart Allbutton on the Worker Status page of the monitor, then wait for 15 seconds for the worker's beginning to start.
Before Migration, you must ensure that there can be no duplicate items in the names of the pools and workers. Includes but is not limited to worker names being equal to pool names.
PRBv2 does not support PID #0, but PRBv3 supports it.
This makes the migration fail if you want to migrate PID #0 from PRBv2 to PRBv3.
If your PRBv3 is running and migration from PRBv2 is also necessary. Before your migration, check it to avoid the 2 limitations above.
If your PRBv3 is brand new but may have some test data or you failed to migrate before, the previous test data or half-imported dirty data will result in poor synchronization results. Therefore, you need to:
- First, stop PRBv3 by
sudo docker compose down
- Delete the
- Start the normal synchronization process from the start of this article.