Where does hyperledger fabric store the database for the blockchain?

+1 vote

Hi. I need to know where the Hyperledger fabric stores the database of the Blockchain. I am trying to develop a new chaincode and so I want to clean up the existing Blockchain. I am working on Ubuntu machine and want to delete the relevant files of Hyperledger fabric. So can you tell me where the files of Hyperledger is stored? 

Jul 5, 2018 in Blockchain by charlie_brown
• 7,720 points

recategorized Jul 6, 2018 by Vardhan 1,028 views

4 answers to this question.

+1 vote
Best answer

The data of the Hyperledger Blockchain is stored in folder /var/hyperledger/production/db. Go to this directory:

$ cd /var/hyperledger/production/db

and then remove all the files in it:

$ rm -rf *
answered Apr 29 by Tina

selected Apr 29 by Omkar
+1 vote

If you want to delete the installed chaincode, then you can use Docker to delete it. Try this command:

docker stop $(docker ps -aq) && docker rm $(docker ps -aq)
answered Apr 29 by Rishi
0 votes

You can also try restarting the docker. It will clear the Blockchain. 

$ docker restart
answered Apr 29 by Kamal
0 votes

Try 

$ chaincode stop
answered Apr 29 by Dinesh
Hey @Dinesh. This might stop the chaincode but the requirement is to clear the files.

Related Questions In Blockchain

0 votes
1 answer

Where does Hyperledger Fabric store the database for the Blockchain?

The Hyperledger Fabric stores the database in ...READ MORE

answered Jul 13, 2018 in Blockchain by Perry
• 17,020 points
803 views
0 votes
1 answer

Where can I find the reference format for crypto-config.yaml and configtx.yaml Hyperledger Fabric files?

The sample config files in the Hyperledger Fabric main ...READ MORE

answered Jun 27, 2018 in Blockchain by ariaholic
• 7,340 points
434 views
+1 vote
1 answer
+1 vote
5 answers

Where does the smart contracts stored and executed on blockchain?

Ethereum smart contracts are executed on EVM ...READ MORE

answered May 2, 2018 in Blockchain by Shashank
• 10,350 points
1,029 views
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,550 points
82 views
+1 vote
1 answer
0 votes
1 answer

How blocks are linked in the Hyperledger Fabric blockchain?

The structure of block in Hyperledger Fabric ...READ MORE

answered Jul 3, 2018 in Blockchain by Omkar
• 67,660 points
394 views
+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Consider following tutorial from Hyperledger Fabric "Getting Started" pages. Basically ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
129 views