本文介绍了如何在不丢失现有数据的情况下重新启动Fabric Composer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地尝试过"carauction-network"示例.但是,当我使用"startFabric.sh"文件启动网络时,它正在删除Couch DB&再次创建Couch DB,由于这些旧数据正在丢失.请提出如何在不清除数据的情况下启动Fabric服务器的方法.

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.

推荐答案

fabric-dev-servers (以前称为fabric-tools)下的startFabric.sh不仅可以启动Fabric,还可以删除更多内容.现有的Fabric容器,并根据Docker映像重新创建新的容器.这样的影响是,您将从结构中丢失了所有数据和业务网络.现在,除PeerAdmin @ hlfv1之外的所有商务网卡都将无效.

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.

如果要在创建Fabric之后停止并启动它,请按照以下命令保留业务网络和数据:

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文件所在的目录(例如/home/<user>/fabric-tools/fabric-scripts/hlfv1/composer)
  • 运行docker-compose stop到结构容器顶部
  • 运行docker-compose start以从上次中断的地方重新启动.
  • Change to the directory where the docker-compose.yml file is (e.g. /home/<user>/fabric-tools/fabric-scripts/hlfv1/composer)
  • Run docker-compose stop to top the Fabric Containers
  • Run docker-compose start to restart where you left off.

在使用docker-compose命令之前,必须位于正确的文件夹中.

It is necessary to be in the correct folder before using the docker-compose command.

版本更新

使用Composer v0.20.x(对于Fabric 1.2),文件夹的名称/版本已更改:

With Composer v0.20.x (for Fabric 1.2) the folders' names/version have changed:

/home/<user>/fabric-dev-servers/fabric-scripts/hlfv12/composer

使用Composer v0.19.x(对于Fabric v1.1为旧版本),文件夹名称/版本已更改:

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

这篇关于如何在不丢失现有数据的情况下重新启动Fabric Composer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 20:19