Back to Eos

How To Replay From A Blocks.Log

docs/01_nodeos/04_replays/how-to-replay-from-a-blocks.log.md

2.1.01.1 KB
Original Source

Once you have obtained a copy of the blocks.log file which you wish to replay the blockchain from, copy it to your data/blocks directory, backing up any existing contents if you wish to keep them, and remove the blocks.index, forkdb.dat, shared_memory.bin, and shared_memory.meta.

The table below sumarizes the actions you should take for each of the files enumerated above:

Folder nameFile nameAction
data/blocksblocks.indexRemove
data/blocksblocks.logReplace this file with the blocks.log you want to replay
data/statefork_db.datRemove
data/blocks/reversibleshared_memory.binRemove
data/blocks/reversibleshared_memory.metaRemove

You can use blocks-dir = "blocks" in the config.ini file, or use the --blocks-dir command line option, to specify where to find the blocks.log file to replay.

sh
nodeos --replay-blockchain \
  --plugin eosio::producer_plugin  \
  --plugin eosio::chain_api_plugin \
  --plugin eosio::http_plugin      \
  >> nodeos.log 2>&1 &