Oraichain
  • ORAICHAIN
    • Introduction
    • System Overview
      • AI Layer 1 for Data Economy & blockchain oracle services
      • Layer 2 Rollups and Subnetworks
      • Verifiable and trustless AI Execution
      • Protocol Messages
      • IBC Integration
    • Use Cases
    • Token Economics
  • DEVELOPER GUIDES
    • General
      • Blockchain details
    • CosmWasm Contracts
      • Compile a Contract
      • Deploy a Contract
      • Query a Contract
      • Send tokens to a Contract
      • Manage Contracts using design patterns
      • End-to-end CosmWasm testing with CW-simulate
    • Local testnet chain
    • Wallet
      • OWallet
    • Price Feed
      • CW Oracle Hub
    • VRF 2.0
      • Introduction to Oraichain VRF 2.0
      • Get a Random Value from API
        • Get VRF Value from different networks
        • Contract Addresses and Pricing
        • Validate a Group Signature
      • Security Remarks
      • API Reference
      • Get support from Oraichain team
    • OraiDEX
      • ORAIX Token
      • OBridge
        • OraiBTC
        • TON Bridge
          • TON Blockchain 101
      • Decentralization
    • Indexers
      • SubQuery
    • OraichainEVM
      • Getting started
      • Smart Contracts
        • Oraichain EVM Precompiled Contracts
        • Address
        • Bank
        • Wasm
        • Authz
      • Guides
        • Metamask
        • Remix
        • Foundry
        • Hardhat
        • Tools
        • Oraichain EVM RPC
  • GOVERNANCE
    • Privacy Policy
  • NODES & VALIDATORS
    • Networks
      • Joining Mainnet
        • Build Linux binary from source and become a Sentry Node Operator
        • Become a Validator
      • Joining Testnet
        • Become Testnet Fullnode From Source
        • StateSync Testnet
        • Faucet Testnet
    • Oraichain Tutorials
      • Migrate one Oraichain node to another
      • Cosmovisor
      • Update validator image
      • Tenderduty
      • Grafana
      • Tracking Unvoted Proposals
      • Tmtop
Powered by GitBook
On this page
  • 1. Back Up Your Current Node Information
  • 2. Set Up a New Node
  • 3. Sync the New Node with the Network
  • 4. Shut Down the Old Node
  • 5. Transfer Node Data to the New Machine
  • 6. Restart the New Node
  • 7. Verify Voting Power and Node ID
  • 8. Import Your Wallet (Optional)
  • Final Thoughts

Was this helpful?

Edit on GitHub
  1. NODES & VALIDATORS
  2. Oraichain Tutorials

Migrate one Oraichain node to another

PreviousOraichain TutorialsNextCosmovisor

Last updated 2 months ago

Was this helpful?

Migrating your node to a new machine doesn't have to be complicated. Follow this structured guide to ensure a smooth transition with minimal downtime.

[!CAUTION] ⚠️ Do not put priv_validator_key.json on two running nodes simultaneously. Your validator will be jailed forever !!!


1. Back Up Your Current Node Information

Before starting, backup your node's essential files to prevent any data loss:

cp -r ~/.oraid/config/priv_validator_key.json ~/.oraid/config/node_key.json ~/backup/

These files are crucial for maintaining your validator identity.


2. Set Up a New Node

Initialize a new node to prepare for the migration. Follow the full node setup guide . You can reuse the same moniker as your existing node.


3. Sync the New Node with the Network

Ensure your new node synchronizes with the network before migration to minimize downtime. Start your new node with a persistent connection to an existing network node.

oraid start --p2p.persistent_peers="<existing-node-id>@<ip>:<port>"

Let it fully sync before proceeding.


4. Shut Down the Old Node

Once the new node is synced, gracefully stop the old node:

systemctl stop orai

This step prevents conflicts between the two nodes.


5. Transfer Node Data to the New Machine

Copy the backed-up files to the new node:

scp ~/backup/priv_validator_key.json ~/backup/node_key.json <new-node-ip>:~/.oraid/config/

Ensure the new node retains the same identity by using the copied keys.


6. Restart the New Node

Apply the changes by restarting the new node:

oraid start

Monitor logs to verify it is running correctly.


7. Verify Voting Power and Node ID

Run the following command to check if your node has successfully migrated:

oraid status && oraid tendermint show-node-id
  • If the voting power and node ID match your previous node, congratulations! 🎉 Your migration is complete.

  • If not, double-check the copied files and restart the node.

  • Common mistakes include not stopping the old node first or copying files before the new node has finished syncing.


8. Import Your Wallet (Optional)

If you need to restore your wallet on the new node, use:

oraid keys add <wallet-name> --recover

Alternatively, use the explorer to manage your wallet effortlessly.


Final Thoughts

Your old node remains unaffected throughout the process. If needed, you can always revert by restarting the old node.

🚀 Happy validating!

here