What are best practices for checkpointing/saving EOSIO chain data in a way that can be restored relatively quickly into the nodes, in case of some corruption in the live chain?
-
Use docker containers. Pull a image from docker hub and port the code and data in local system and use that code and data in a different docker container. So, your code changes will be on your local machine even after your image or chain gets corrupted.– Rajat ChaudharyAug 3, 2018 at 10:49
1 Answer
I think you could copy out the data in ~/.local/share/eosio/nodeos/data/ which are two directories blocks and state. Restoring these two directories to a previous state should make it work again. Be sure to have stopped nodeos before copying the stuff out. If you stop nodeos like normal I don't see why it wouldn't restart like normal if you restore these files to their previous state.