I want to backup the essential files that are crucial for the operation of the network from the last block in the ledger.
Answer for this question could bloat, I will cover most part of it here for the benefit of folks who have this question, especially this will help when they want to deploy the network through Kubernetes. Also similar questions are being asked frequently in the official RocketChat channel.
The essential set of files for the Validator and the PoET are stored in /etc/sawtooth
(keys and config directory) and /var/lib/sawtooth
(data directory) directories by default, unless changed. Create a mounted volume for these so that they can be reused when a new instance is orchestrated.
Here's the file through which the default validator paths can be changed https://github.com/hyperledger/sawtooth-core/blob/master/validator/packaging/path.toml.example
Note that you've missed keys in the list of essential files in your question and that plays important role in the network. In case of PoET each enclave registration information is stored in the Validator Registry against the Validator's public key. In case of Raft/PBFT consensus engine makes use of keys (members list info) to send peer-peer messages.
In case of Raft the data directory it is /var/lib/sawtooth-raft-engine
.
Significance of each of the file you listed may not be important for the most people. However, here goes explanation on important ones
*-lock
files you see are system generated. If you see these, then one of the process must have opened the file for write. block-00.lmdb
it's the block store/block chain, has KV pair of block-id to block information. It's also possible to index blocks by other keys. Hyperledger Sawtooth documentation is right place to understand complete details. merkle-00.lmdb
is to store the state root hash/global state. It's merkle tree representation in KV pair. txn-receipts-00.lmdb
file is where transaction execution status is stored upon success. This also has information about events if any associated with those transactions. 这是锯齿常见问题解答中的文件列表: https : //sawtooth.hyperledger.org/faq/validator/#what-files-does-sawtooth-use
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.