Goal
This procedure creates a database containing the chain state, with full history since genesis state.
Before you begin
- Make sure EOSIO is installed.
- Learn about Using Nodeos.
- Get familiar with state_history_plugin.
Steps
- Enable the
producer_api_plugin
on a node with full state-history.
- Create a portable snapshot:
curl http://127.0.0.1:8888/v1/producer/create_snapshot | json_pp
- Wait for
nodeos
to process several blocks after the snapshot completed. The goal is for the state-history files to contain at least 1 more block than the portable snapshot has, and for theblocks.log
file to contain the block after it has become irreversible.
- Stop
nodeos
. -
Make backups of:
- The newly-created portable snapshot (
data/snapshots/snapshot-xxxxxxx.bin
) -
The contents of
data/state-history
:chain_state_history.log
trace_history.log
chain_state_history.index
: optional. Restoring will take longer without this file.trace_history.index
: optional. Restoring will take longer without this file.
- Optional: the contents of
data/blocks
, but excludingdata/blocks/reversible
.
- The newly-created portable snapshot (