Migrating

In some cases, you might want to move your running validator from one server to another. For example, this might be the case if you find a cheaper alternative or if your host does not meet the requirements.

In this case, what you need to do is following a two-step procedure:

  1. Set and fully sync up a full node

  2. Migrate data from old node to new node

1. Setup new full nodearrow-up-right

To avoid missing the least amount of blocks it is recommended that you setup a new server and fully sync up a full node first. To do this, you can read the guide here.

Proceed to step 2 only if your new node has caught up.

realio-networkd status 2>&1 | jq "{catching_up: .SyncInfo.catching_up}"

2. Migrate Dataarrow-up-right

Stopping both the validator and the newly synced full nodearrow-up-right

In order to avoid as much side affects as possible we will be stopping both nodes.

systemctl stop realio-networkd

Backup the following data in the validator nodearrow-up-right

In order to properly migrate our validator node to another server you will need to backup the following data:

  1. The validator private key. This is located inside the ~/.realio-network/config/priv_validator_key.json file.

  2. The validator consensus state. This is located inside the ~/.realio-network/data/priv_validator_state.json file.

  3. If you keep your keys on the node make sure you have the secret recovery phrase (mnemonic phrase) associated with your key(s).

circle-check

Migrating data to the new full nodearrow-up-right

With both nodes stopped you will be copying the backed up data in to the newly synced full node.

triangle-exclamation

Transfer the following backed up files from the old node to the new node:

  • ~/.realio-network/config/priv_validator_key.json

  • ~/.realio-network/data/priv_validator_state.json

Startup the new validator nodearrow-up-right

Once you have moved your priv_validator_key.json and priv_validator_state to the newly synced full node, it will be recognized as the same validator node.

triangle-exclamation

With the old validator node stopped, start up the new node:

triangle-exclamation

(Optional) Recover your keyarrow-up-right

If you originally had your key in the previous server you can easily add it back using the secret recovery phrase (mnemonic phrase) you had backed up.

Last updated