How to restart the fabric composer without losing the existing data?

hyperledger composer
hyperledger composer tutorial

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.

Hyperledger Composer Network Reset Command, Network Data · Programmatic access control · Hyperledger Composer Historian · Customising card stores Start an already installed business network: composer network start deployed to an instance of Hyperledger Fabric: composer network download Bind an existing identity to a participant: composer identity bind. how start Fabric without losing previous data. the fabric composer without losing the existing data? to restart the fabric composer without losing the

Edit you startFabric.sh inside fabric-dev-server/fabric-scripts/hlfv11 like below

#!/bin/bash

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Exit on first error, print all commands.
set -e

Usage() {
    echo ""
    echo "Usage: ./startFabric.sh [-d || --dev]"
    echo ""
    echo "Options:"
    echo -e "\t-d or --dev: (Optional) enable fabric development mode"
    echo ""
    echo "Example: ./startFabric.sh"
    echo ""
    exit 1
}

Parse_Arguments() {
    while [ $# -gt 0 ]; do
        case $1 in
            --help)
                HELPINFO=true
                ;;
            --dev | -d)
                FABRIC_DEV_MODE=true
                ;;
        esac
        shift
    done
}

Parse_Arguments $@

if [ "${HELPINFO}" == "true" ]; then
    Usage
fi

#Detect architecture
ARCH=`uname -m`

# Grab the current directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [ "${FABRIC_DEV_MODE}" == "true" ]; then
    DOCKER_FILE="${DIR}"/composer/docker-compose-dev.yml
else
    DOCKER_FILE="${DIR}"/composer/docker-compose.yml
fi

ARCH=$ARCH docker-compose -f "${DOCKER_FILE}" stop
ARCH=$ARCH docker-compose -f "${DOCKER_FILE}" up -d

# wait for Hyperledger Fabric to start
# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=<larger number>
echo "sleeping for ${FABRIC_START_TIMEOUT} seconds to wait for fabric to complete start up"
sleep ${FABRIC_START_TIMEOUT}

# Create the channel
#docker exec peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel.tx

# Join peer0.org1.example.com to the channel.
#docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b composerchannel.block

if [ "${FABRIC_DEV_MODE}" == "true" ]; then
    echo "Fabric Network started in chaincode development mode"
fi

Hyperledger Composer CLI Commands, please read How to restart the fabric composer without losing the existing data? - you need locate the correct docker-compose.yaml file(s) and (from the directory  How to restart the fabric composer without losing the existing data? 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

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.

#!/bin/bash
cd ./fabric-scripts/hlfv1/composer
docker-compose stop
docker-compose start

Seems trivial, and doesn't add much to the discussion but it saves time.

Saving data on Hyperledger-Composer network, There are many data(Participant and asset) is existing in my composer blockchain( So if you want to stop and start your fabric without loss of existing data. If you are looking to configure a service’s restart policy, please refer to restart in Compose file v3 and restart in Compose v2. Note that if you are deploying a stack in swarm mode, you should use restart_policy, instead. fig, composition, compose, docker, orchestration, cli, restart

Block chain data will lose in Hyperleger composer network - html, 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  This video shows you how to use Windows Task Manager to restart your computer without losing any data. While you're stuck at home, make the most of your time by learning a new language , skill , or even train for a remote-work job with our new premium online courses.

How to restart the fabric composer without losing the existing data , Introduction of Hyperledger composer This Presentation is for students of How to restart the fabric composer without losing the existing data? Hyperledger Composer is an application development framework which simplifies and expedites the creation of Hyperledger fabric blockchain applications. If you're new to Blockchain, Hyperledger Fabric or Hyperledger Composer, we recommend that you start at the Hyperledger Composer website:

Hyperledger composer, Fabric. Composer. So far I have discussed only regarding Fabric's However if you are interested in blockchain applications, directly start with the Composer. and integrate existing systems and data with your blockchain applications. My Charge HR was coming apart, so I got a replacement device. In order to avoid losing any data, I synced the data yesterday evening before removing the device, and setting up the new device (all using the latest version of the Android app). Unfortunately, as soon as the new device was connected,

Comments
  • Solution with docker-compose start WILL NOT start the chaincode container. Looks like you still have to reinstall and reinstantiate your network after the restart