0

We are using Composer to connect Blockchain Network (Hyperledger Fabric).

We have created one POC using above technology stack. But when we restart blockchain network all asset data stored on ledger is lost.

How to retrieve that ledger data after restarting the blockchain network?

Thanks in advance.

  • Also answered here: [restart Development Fabric](https://stackoverflow.com/questions/48070818/how-to-restart-the-fabric-composer-without-losing-the-existing-data) – R Thatcher Jan 26 '18 at 10:24

1 Answers1

1

You can persist the data on the disk. Mount a directory in the docker-host into a relevant directory in the container. For example, you may add the following two lines in the peer container specification in the docker-compose-base.yaml file:

volumes:
 - /var/hyperledger/peer0:/var/hyperledger/production

For the CouchDB container, you may add the following two lines in the CouchDB container specification:

volumes:
 - /var/hyperledger/couchdb0:/opt/couchdb/data

Ref: http://hyperledger-fabric.readthedocs.io/en/release/build_network.html#a-note-on-data-persistence

arnabkaycee
  • 1,542
  • 12
  • 25