I have a private blockchain, mined by one ec2 instance. When I restart the instance, significant part of the chain disappear with all transaction and contracts on it. How can I prevent this?

  • How do you restart your instance? You should make sure that geth is shutdown cleanly before restarting.
    – Ismael
    Commented Jan 3, 2019 at 16:03
  • I am restarting it hard way with instance reboot in aws console. I would not be suprised if one or two block are missing, but I missed half of the chain. Are blocks saved in some cache and save to the hdd let's say each few minutes or is saving instant? Commented Jan 3, 2019 at 16:54
  • From geth developer Please shut Geth down properly, don't kill it. Murdering it will cause any state only stored in memory to be lost.
    – Ismael
    Commented Jan 3, 2019 at 20:59

1 Answer 1


Please ensure you are using the same network ID and other parameters of the geth, while using the geth command, when you want to access your network over the console each time. If you alter the network ID or the datadir, it will not use the existing contents of the Blockchain

  • looks like it could be the issue since I made lot of experiments on many machines and in few directories. I tried it with clean chain, mined few blocks, restarted instance and data are here intact. Commented Jan 3, 2019 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.