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,710 points

recategorized Jul 6, 2018 by Vardhan 749 views

4 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+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
• 16,450 points
544 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,320 points
320 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,330 points
492 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
• 27,620 points
51 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
• 66,880 points
248 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
71 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.