1

I'm running Geth as well as Mist. I know I can run Geth, run Geth with console, run Geth and attach the console in a new terminal, as well as run Mist on its own. For some reason Mist doesn't seem to boot up when Geth is already running...

Either way, I want to do analysis on the live/main net so I want to download the full blockchain as well as have the fast version for transactions for when the full blockchain is not fully synched for a few days.

Is this possible/recommendable to do simply by specifying one of two separate data directories that I explicitly call when I run geth depending on if I want to update the full blockchain with geth or the light blockchain with geth --fast?

1 Answer 1

1

Yes.

Use --datadir for Geth. You just have to be careful not to mix up or forget specifying the --datadir whenever you run any Geth commands. This can also be used to have different testnets or private chains.

The database used by Geth can only be accessed by one process: only one instance with a given --datadir can run at a time. Mist also runs Geth, so you may need to also follow How to set a different datadir in Mist?

2
  • That's helpful, what is the actual danger of mixing commands. As in, I run --fast on the slow chain datadir, or vice versa? Mar 28, 2017 at 20:44
  • By mixing up commands, for example Geth with dir1 and then Geth console with dir2, you might be expecting certain blocks and transactions in the console but not see them because you are operating on chain dir1. Mixing up a testnet or private chain with mainnet may also lead to mainnet overwriting the other chain since mainnet is "longer". Generally, mixing up commands can end up with behavior that seems very confusing until the mix up is discovered.
    – eth
    Mar 31, 2017 at 8:54

Your Answer

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

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