Backup and Restore of GoQuorum Nodes
GoQuorum supports export and import of chain data with built in tooling.
This is an effective node backup mechanism adapted for the specific needs of GoQuorum such as private transactions, permissioning, and supported consensus algorithms.
GoQuorum chain data import and export must run after
geth process is stopped.
Node Backup (Export)
Backup functionality mimics original
geth export command. GoQuorum export accepts 3 arguments:
- Export file name required
- First block
- Last block are optional but must be provided together when used
geth export <export file name> --datadir <geth data dir>
Node Restore (Import)
Restore functionality mimics original
geth import command but requires transaction manager environment variable.
GoQuorum import must run on a new node with an initialized
geth init has been executed.
Restore supports arbitrary number of import files (at least 1).
If private transactions are used in the chain data, Private Transaction Manager process for the original exported node must be running on the PTM ipc endpoint during import chain. Otherwise, nil pointer exceptions will be raised.
PRIVATE_CONFIG=<PTM ipc endpoint> geth import <import file names...> --datadir <geth data dir>
Special Consensus Considerations
IBFT block data contains sealer information in the header, to restore a copy of exported chain data, the new node must be initialized use an IBFT genesis file with exact same validator set encoded in extra data field as original exported node’s genesis.
Raft backup do not account for current Raft state. An exported chain data from a Raft cluster can only be used by new nodes being added to that same cluster only.