Tools, FAQ, Tutorials:
Blockchain Data Files on Peer Container
Where is the location of Blockchain Data Files on a Peer Container?
✍: FYIcenter.com
We known that each peer container needs to maintain
a copy of the ledger data for each channel it joined.
Ledger data is divided into 2 parts: World State and Blockchain.
The World State data is stored in a database, like Go LevelDB of CouchDB.
The Blockchain data is stored in files, one file per block.
By default, the location of Blockchain data files are located in the /var/hyperledger/production/ledgersData/chains directory on the peer container.
You can run the "docker exec" command to look at them:
$ docker exec peer0.org1.example.com ls -l \ /var/hyperledger/production/ledgersData/chains drwxr-xr-x 3 root root 4096 Apr 1 01:10 chains drwxr-xr-x 2 root root 4096 Apr 1 01:10 index $ docker exec peer0.org1.example.com ls -l \ /var/hyperledger/production/ledgersData/chains/chains/mychannel -rw-r----- 1 root root 77018 Apr 1 15:30 blockfile_000000
You can also take a copy of the block file with the "docker cp" command:
$ docker exec peer0.org1.example.com ls -l \ /var/hyperledger/production/ledgersData/chains drwxr-xr-x 3 root root 4096 Apr 1 01:10 chains drwxr-xr-x 2 root root 4096 Apr 1 01:10 index $ docker cp peer0.org1.example.com:\ /var/hyperledger/production/ledgersData/chains/chains/mychannel/blockfile_000000 .
Since ledgers are divided by channels, each channel will have it's own blockchain. This is why block files are separated by channels.
Â
⇒ Inspect Docker Container Configuration
⇠Auto-Start of Required Chaincode Container
⇑ Hyperledger Fabric Docker Containers
⇑⇑ Hyperledger Tutorials
2020-05-29, 799👍, 0💬
Popular Posts:
How to use the "forward-request" Policy Statement to call the backend service for an Azure API servi...
How to add request query string Parameters to my Azure API operation to make it more user friendly? ...
What is Azure API Management Gateway? Azure API Management Gateway is the Azure Web server that serv...
How to Instantiate Chaincode on BYFN Channel? You can follow this tutorial to Instantiate Chaincode ...
Why am I getting this "Docker failed to initialize" error? After installing the latest version of Do...