If I have an exported binary copy of the block chain how can I import it but to a different directory than the default location? For example if I run geth import /mnt/blockchains/ETH/eth.bak it will begin importing to the default location if I run geth --datadir "/mnt/blockchains/ETH/" it will begin syncing the blockchain from scratch.

1 Answer 1


Just move the directory to the new place and create a symlink to it, and run geth as normal.

  • The drive was filed so I exported to a NFS mount than deleted the data in /chaindata
    – sealfab
    Jul 15, 2017 at 12:37
  • Did I answer your question?
    – xgabrielx
    Jul 15, 2017 at 13:55
  • I'm not sure but I think no. Maybe I didn't give enough info in the post. Doesn't your answer depend on the original data directory still being present?
    – sealfab
    Jul 15, 2017 at 17:55
  • You wanted to move from the default directory to another one, the symlink approach will make you do that. If you already deleted the original chaindata, sure you have to start over.
    – xgabrielx
    Jul 15, 2017 at 18:19
  • Makes sense, I wasn't sure if I was able to import the block chain that I previously exported. I'll just resync. Thanks
    – sealfab
    Jul 15, 2017 at 20:32

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.