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.