I had a private ethereum blockchain with 1 node running in production. I accidentally ran a geth init genesis.json --datadir . command in my main node.

Did this command overwrite the data directory folder of my main node? I was able to set up another node in the network on another server because geth process was running on a Unix system service daemon, which means that the data folder wasn't actually unlinked while the process was running.

Now I have 2 private blockchain nodes and I want to stop and reset the 1st one, but I'm not sure what will happen to the blockchain. If I stop the 1st node and then use the 2nd node as a peer to resync the first node when I restart, will the chain be corrupted? I have miners on both nodes and I'm using a clique algorithm for consensus.

1 Answer 1


In recent versions geth doesn't overwrite the directory if it was already initialized.

You should be able to test if geth overwrite data repeating the steps in a new empty directory.

  • What do you mean by current? I'm using 1.9.13-stable-cbc4ac26
    – JustinZ
    Jul 28, 2020 at 13:18
  • @JustinZ I think at least from v1.8.xx it didn't overwrite any data, but every version of geth is different and probably you should test it.
    – Ismael
    Jul 28, 2020 at 13:26

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.