Docker swarm
Hyperledger fabric v1.4.4
I'm trying to restore the blockchain network with all the previous data. So what I did that I have created a backup of /var/hyperledger/production/node_type
directory for every node. And then using these directory like below in docker-compose.yaml
file
Lets assume I have created a backup of orderer1
node in myproject/networks/orderer1
directory then under volume section I'm doing something like myproject/networks/orderer1/production:/var/hyperledger/production
.
compose-file before network restoration
volumes:
- orderer1.example.com:/var/hyperledger/production/orderer:rw
compose file for restoring network
volumes:
/home/delta/GoWorkspace/src/github.com/testchain/bchain_network/orderer1/orderer:/var/hyperledger/production/orderer:rw
But when I'm trying to start the network it gives an error
Orderer node
panic: Error opening leveldb: open /var/hyperledger/production/orderer/index/LOCK: permission denied
The link that I'm following for network restoration is https://medium.com/@jariarud/hyperledger-fabric-backup-and-restore-3263561e259e
Please help.
You do not need to manually map the location of the volume like below and remove :rw
volumes:
/home/delta/GoWorkspace/src/github.com/testchain/bchain_network/orderer1/orderer:/var/hyperledger/production/orderer
Just leave as it is docker will take care of that like below
volumes:
- orderer1.example.com:/var/hyperledger/production/orderer