I have tried "carauction-network" example in my local. But when I am starting the network by using "startFabric.sh" file, it is removing the Couch DB & again creating Couch DB, due to this old data are getting lost. Please suggest how we can start the fabric server without cleaning the data.
相关问题
- chaincode in hyperledger composer vs chaincode in
- How to get timestamp when transaction is committed
- Instantiating Chaincode in Hyperledger Composer wi
- How to deploy Hyperledger Composer to “Azure Hyper
- Hyperledger-Composer: Issuing identity using REST-
相关文章
- Does Composer needs an already built Fabric networ
- Error: Cannot find module './api' (Hyperle
- how to access the 'eventEmitted' field in
- Hyperledger Composer - ACL Rule with function in c
- Get Count of assets in HyperLedger Composer Query?
- Hyperledger composer network install
- Getting timestamps in deterministic way in Hyperle
- is there any size limit for pdf in hyperledger fab
To expand on R Thatcher's solution, if you have access to a bash shell, then you can put this script in your fabric-dev-server folder. It will restart the network as in the steps above, without losing your data. Simply cd into the correct directory and runs docker-compose stop & docker-compose start. Also works fine to run this after a restart to bring the network back.
Seems trivial, and doesn't add much to the discussion but it saves time.
Edit you startFabric.sh inside fabric-dev-server/fabric-scripts/hlfv11 like below
The
startFabric.sh
under fabric-dev-servers (formerly fabric-tools) does more than just start the Fabric - it removes existing Fabric Containers and recreates new Containers from the Docker Images. The impact of this is that you lose all your data and your Business Network from the Fabric. All Business Network Cards except PeerAdmin@hlfv1 are now useless.If you want to stop and start your Fabric after you have created it, retaining your Business Network and data follow these commands:
docker-compose.yml
file is (e.g./home/<user>/fabric-tools/fabric-scripts/hlfv1/composer
)docker-compose stop
to top the Fabric Containersdocker-compose start
to restart where you left off.It is necessary to be in the correct folder before using the docker-compose command.
VERSION UPDATE
With Composer v0.20.x (for Fabric 1.2) the folders' names/version have changed:
/home/<user>/fabric-dev-servers/fabric-scripts/hlfv12/composer
With Composer v0.19.x (older, for Fabric v1.1) the folders names/versions have changed:
/home/<user>/fabric-dev-servers/fabric-scripts/hlfv11/composer