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 6, 2018 in Blockchain by charlie_brown
• 7,710 points

recategorized Jul 7, 2018 by Vardhan 1,973 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, 2019 by Tina

selected Apr 29, 2019 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, 2019 by Rishi
0 votes

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

$ docker restart
answered Apr 29, 2019 by Kamal
0 votes

Try 

$ chaincode stop
answered Apr 29, 2019 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,100 points
1,749 views
0 votes
1 answer
0 votes
1 answer
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 aryya
• 7,440 points
796 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,720 points
428 views
+1 vote
1 answer
0 votes
1 answer

Where does Hyperledger fabric store the public key and private key of the user?

It signs the transaction with its private key ...READ MORE

answered Apr 11 in Blockchain by Rahul
• 8,980 points
40 views
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
• 69,210 points
989 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP