
Backup and Restore Validator Node
DISCLAIMER: This guide is for informational purposes only. Use at your own risk. Always verify steps with official documentation and ensure you fully understand each action before proceeding.
Part 1: Backing Up the Node
Stop the node:
sudo systemctl stop 0gdBackup the wallet private key by exporting the Ethereum key:
0gchaind keys unsafe-export-eth-key "wallet"Note: Write down this private key and store it securely.
Backup the validator key:
File location:
/root/.0gchain/config/priv_validator_key.jsonCopy this file to your local machine.
Store it carefully; this is the most crucial key for your validator.
If you've never backed up before, backup the entire config folder:
cp -r /root/.0gchain/config /path/to/backup/location
Part 2: Restoring the Node and Wallet
Install a new node and sync the blockchain:
# Steps to install a new node # Wait until the node is fully syncedPerform the restoration:
a. Stop the new node:
sudo systemctl stop 0gdb. WARNING: Ensure you've stopped the node on the old VPS. Never run 2 nodes with the same
priv_validator_key.json. This will lead to double signing and potential slashing.c. Copy and replace the previously backed up
priv_validator_key.jsonfile into the/root/.0gchain/config/directory of the new node.d. Restore the wallet:
From Private key:
0gchaind keys unsafe-import-eth-key "wallet_name" "privatekey"Or from mnemonic phrase:
0gchaind keys add "wallet" --eth --recover
Restart the node:
sudo systemctl start 0gdCheck the node and validator status to ensure everything is functioning normally.
Always backup important data before making any significant changes.
Ensure you store keys and backups in a secure location, preferably offline.
Never share your private key or mnemonic phrase with anyone.
Always double-check before performing operations related to your validator to avoid the risk of slashing.
Last updated