I want to know how to take a backup of Private Ethereum Blockchain (chain data folder) while the chain is running.

The problem is that suppose my chain height is at 1000 and it gets crashed or if I kill the process manually and after that I start the chain again then it never starts the chain from the height where it has stooped.

But if I close the chain properly then it gets started from where it has stooped. After closing the chain properly I get the message as

Blockchain manager stopped.  
Stopping ethereum protocol  
Ethereum Protocol Stopped  
Transaction pool stopped.  
Database Closed

I think the reason is it is keeping the blocks in RAM for some time and after some height it is storing it in the database.

I tried to take a backup from geth console :


and it worked well, but the problem is as we can't use admin from web3 module so it is not possible from application.

I even tried import and export option of geth, but to do that the chain should not be running.

so is there any way to take a backup of chaindata folder.


I never backup my geth nodes that way. I personally would do daily incremental rsync backups, followed by weekly full backups of your chaindata folder, and all other folders containing transaction data, keystore, etc..

  • Hey @hextet. Can the files backed up by rsync backups be used to setup a new node if the current node some how malfunctions?
    – Subik
    Aug 3 '20 at 6:15
  • And would this work while the node is running, as the OP asked? What is your rsync command?
    – Andyc
    Aug 2 at 6:15

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.