github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/docs/tutorials/7-dump-restore.md (about) 1 # Dump / Restore 2 3 Sometimes there are breaking changes in burrow. This provides a method for dumping an old chain, and restoring a new chain 4 with that state. 5 6 ## Dumping Existing State 7 8 The `burrow dump` command connects to burrow node and retrieves the following: 9 10 1. The accounts (the addresses) 11 2. Contracts and contract storage 12 3. Name registry items 13 4. EVM Events 14 15 This can be dumped in json or go-amino format. The structure is described in (protobuf)[../protobuf/dump.proto]. By default, 16 it saved in go-amino, but it can be saved in json format by specify `--json`. It is also possible to dump the state at a specific 17 height using `--height`. 18 19 ## Recreate State 20 21 You will need the `.keys` directory of the old chain, the `genesis.json` (called genesis-original in the example below) 22 from the old chain and the dump file (called `dump.json` here). 23 24 ```shell 25 burrow configure -m BurrowTestRestoreNode -n "Restored Chain" -g genesis-original.json -w genesis.json --restore-dump dump.json > burrow.toml 26 ``` 27 28 Note that the chain genesis will contain an `AppHash` specific to this restore file. 29 30 ## Restore Chain 31 32 This will populate the `.burrow` directory with the state. 33 34 ```shell 35 burrow restore dump.json 36 ``` 37 38 This will create a block 0 with the restored state. Normally burrow chains start a height 1. 39 40 ## Start Chain 41 42 Simply start `burrow` as you would normally. 43 44 ```shell 45 burrow start 46 ``` 47 48 Now burrow should start making blocks at 1 as usual.