问题
background:
I am developing Hyperledger Fabric Network(v1.1) and are using couchdb. For continuing operation. It is necessary to persist data go each component(peer, orderer etc..).
Issue:
I don't know what I should persist couchdb's data for continuing operation in production environment.
Question:
(1)Should I persist these data in the below? And, if there is insufficient, please tell me that what I should persist data. /opt/couchdb/data /opt/couchdb/etc
(2)If I don't persist these couchdb's data. what will happen? (For example, querying error,clush the data and difference from block's data).Please tell me.
sincerely.
回答1:
If you don't persist the CouchDB data, then if you delete or upgrade the container you will lose the data. The good news is that if you have persisted the ledger from your peer, it will rebuild the data in CouchDB on startup but of course this will delay how long it takes for the peer to be able to serve any type of request.
The CouchDB image uses /opt/couchdb/data
as the volume where it stores the data so you'll want to mount an external volume there.
来源:https://stackoverflow.com/questions/52794726/hyperledger-fabric-couchdb-persistent