When I look into my go-ethereum (geth) configuration directory, I see the following files and directories:

 $ ls -alF ~/.ethereum/
total 176
drwxr-xr-x  8 pi pi   4096 Jan 20 07:19 ./
drwxr-xr-x 17 pi pi   4096 Jan 20 07:10 ../
drwxr-xr-x  2 pi pi   4096 Aug 31 06:16 blockchain/
drwxr-xr-x  2 pi pi 131072 Jan 22 07:40 chaindata/
drwxr-xr-x  2 pi pi   4096 Jan 20 07:19 dapp/
drwxr-xr-x  2 pi pi   4096 Aug 31 06:20 extra/
srw-------  1 pi pi      0 Jan 20 07:19 geth.ipc=
-rwxr-xr-x  1 pi pi     53 Oct 10 10:17 history*
-rw-------  1 pi pi     64 Aug 21 12:19 nodekey
drwxr-xr-x  2 pi pi   4096 Jan 22 04:18 nodes/
drwxr-xr-x  2 pi pi  12288 Aug 31 06:20 state/

Can you explain the purpose of each of them?


Some of the files in your directory listing are old and the result of maintaining the files after upgrades no longer using them. Necessary files can be summarized like so:

  • chaindata/ (directory of chain and state data)
  • dapp/ (directory for placeholder of dapp data)
  • geth.ipc (file for inter-process-communication as used by Mist)
  • history (file for console command history from geth attach or geth console)
  • keystore/ (directory for encrypted private keys)
  • nodekey (file of public key used by peers to connect with)
  • nodes/ (directory peer connection data, used to establish network on start)

The following directories are from an old version and can be safely discarded:

  • blockchain/ (old, can be discarded)
  • state (old, can be discarded)
  • extra/ (old, can be discarded)

In general , the most important item to back up is the keystore/ directory, since it contains the encrypted private keys used to control Ethereum accounts. These keys cannot be recovered if lost. Additionally, if you are running the node as a public peer or bootnode, backing up the nodekey file is important to maintain the same peer key when changing devices. Most other files can be reproduced by synchronizing with the network again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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