To migrate the node to the new server, we will need to download the priv_validator_key.json file from the old server where the node is installed. An example of the path to this file looks like this
$HOME/.<PROJECT_NAME>/config/priv_validator_key.json
In our case, the path would look like this
$HOME/.archway/config/priv_validator_key.json
After downloading this file, go to the new server and start installing the node you want to migrate. There is no need to create a new wallet, we will restore it using mnemonic from the old wallet (which should have been saved during the initial installation), and there is no need to create a validator either.
After the node is fully synchronized on the new server, recover the keys using the mnemonic. The command to restore using Archway as an example:
archwayd keys add <WALLET_NAME> --recover
Enter the mnemonic phrase, then the password for the wallet
At this point we will need to stop nodes on both servers to avoid 2 validators running simultaneously. Try to perform the actions below as quickly as possible to avoid being jailed
Stop the node on both servers:
sudo systemctl stop archwayd
Delete priv_validator_key.json on new server:
rm -rf $HOME/.archway/config/priv_validator_key.json
Then transfer the previously downloaded priv_validator_key.json to the new server, in the appropriate config directory and run the node:
sudo systemctl restart archwayd && sudo journalctl -u archwayd -f -o cat
Check that the validator works in the explorer. Pay attention to the processing of the blocks and getting into the jail:
