i cant seem to find this in the docs - i want to run a geth full archive node. I have the NVME space for the current data but i need a new drive for the historical data.

is there a flag or setting for the location of the archive data? i did not see it here https://geth.ethereum.org/docs/interface/command-line-options

edit: is it --datadir.ancient ??


2 Answers 2


The difference between archive and full is in the garbage collection - a full node verifies all the state on the chain, but doesn't keep it all. An archive does. As such, the setting you're looking for isn't in the --syncmode flag, but rather:

--gcmode archive

You can find that in the Geth command line docs, or in this Geth blog post in the section "Breaking Changes". There's also some discussion about --gcmode archive in this StackExchange here.

Update: I just realized that I literally read the question wrong, and that the OP is looking for information on storing ancient data in a different location than the "regular" chaindata while running an archive node.

The command line flag for storing ancient data in a different location is indeed --datadir.ancient. It was announced in the EF blog from the Geth team here. If memory serves me right, the node might not immediately move all data into ancient, and it might be a more gradual process, perhaps explaining why the OP is not seeing an immediate change.

I figure I'll keep the old information about running an archive node up just in case someone else lands here looking for it.

  • 1
    I was looking for a different place to store archive data - which i confused with ancient data. it looks like this isnt currently possible with GETH or TG. Thanks for your answer.
    – D3l_Gato
    Mar 13, 2021 at 17:16

To store all the chain data is --datadir /your/path/to/drive/here. --datadir.ancient is for ancient states which will not generally be needed too much, usually used to mitigate the large file space required onto a HDD. if yo do not specify --datadir.ancient it will default to your --datadir path

  • Thanks for your reply - I currently am running a full node and i want to switch to an archive node. I dont have the space on my nvme for the archive/ancient data. I set gcmode to archive and the datadir.ancient to my HDD but it doesnt seem to be storing any data on the hdd. I am trying to confirm that datadir.ancient will store the archive mode data. thanks.
    – D3l_Gato
    Mar 8, 2021 at 15:34
  • if you want to switch to a archive node, you will need to restart. delete the data the full node created. datadir.ancient is old states, you wont need it once you are already synced. btw, you cannot sync an archive node on a HDD. you MUST sync onto a ssd. @D3l_Gato Mar 9, 2021 at 17:57

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.