VVictor
VVictor

Reputation: 269

How can a peer node retrieve old data after it crashes in Hyperledger Fabric?

I am pretty new to Hyperledger Fabric. I read a bit about gossip protocol but did not get a clear idea. Please help me with these questions. How could a node recover old data from a channel after a crash? What if the channel had only a single peer node and this node crashed?

Upvotes: 0

Views: 323

Answers (2)

Narendranath Reddy
Narendranath Reddy

Reputation: 4133

All ledger, blocks etc stores in below particular location in the peer container

/var/hyperledger/production

All you have todo is create a backup volume and map it

Sample snippet below

Create Volume:

volumes:
  backup_peer1:

Add Volume to container:

 - backup_peer1:/var/hyperledger/production

Upvotes: 1

Bentipe
Bentipe

Reputation: 263

  1. A peer can get old data from a channel from other peers when it recovers. Another way, if you are pointing to a volume were it is storing the ledger information and all its credentials when it recovers can read it from there, thats why it is recomended to use a persistance storage.

  2. Thats bad practice as you are not going to offer High availability, so without peers you are going to stop giving service and your ledger is not going to be available. But, as you can read from the documentation, you can recover from the orderer.

Upvotes: 1

Related Questions