I set up Hyperledger Fabric V0.6 with a docker image. I wrote a small chain code program and perform some operations. Data is getting stored and fetched on request from Hyperledger blockchain.
I restart my chaincode program and data still persist. Of course, this should be the expected behavior.
But when I stop my Hyperledger fabric with command docker-compose down and start it again with docker-compose start and then start my chaincode program, I found that the whole data which was written before the restart is gone. I couldn't find any data in my blockchain.
How can I avoid this behavior of Hyperledger? I am running it on a single peer/node. With multiple peers, if one of the peers restarted, then data/transactions from other peers get copied on it. But consider the worst scenario when all peers down. Does that mean we lose all our data?