如何备份/还原Corda节点? [英] How backup/restore corda node?
问题描述
一旦Corda节点发生故障,适当的恢复过程是什么? Corda交易仅与特定业务网络的合格节点共享,而不与每个节点共享。因此,在恢复故障节点时,无法从其他节点复制数据,因此需要从备份中恢复。但是,对于其他正确的节点,备份映像并不完全相同,我想知道如何恢复Corda节点的一致性。
节点数据存储
Corda节点按如下方式存储其重要信息:
- 该节点的数据存储在标准SQL数据库
中- 默认情况下,在名为
persistence.mv
- 默认情况下,在名为
- 节点的密钥和证书存储在Java密钥库的
certificates
文件夹中
从节点崩溃中恢复
如果节点崩溃:
- 数据库和
证书
文件夹的内容将不受影响 - 可以从最近的检查点重新开始飞行流程。
- 可以重播Artemis消息
在换句话说,您可以生成一个新节点,重新添加 persistence.mv
文件, certificates
文件夹和CorDapps,和点头
从损坏/删除节点的文件中恢复
只要您能够恢复,数据丢失/损坏就不会致命:
- 节点的数据库
- 节点的
证书的内容
文件夹
节点所有者有责任确保他们使用标准业务程序保护和备份这些文件。如果这两个都可以恢复并重新添加到新节点,则该节点应照常旋转。
如果节点证书
文件夹无法恢复,您将不再拥有私钥,也无法将资产花费在分类帐上。
如果无法从节点的数据库中恢复某些数据,则该节点可以尝试在适用的情况下(例如,交易历史记录)从其他节点重新请求此数据。但是,没有办法强迫交易对手共享此信息。
Once Corda node failed, what is the appropriate process of recovery? Corda transactions are shared only with qualified nodes for specific business network, not with every nodes. Therefore, when recovering failure node, copying data from other node would not work well, recovering from backup is required. However, backup image is not completely same for other correct nodes, I would like to know how recover consistency of corda node.
Node data storage
A Corda node stores its vital information as follows:
- The node's data is stored in a standard SQL database
- By default, in an H2 database file called
persistence.mv
- By default, in an H2 database file called
- The node's keys and certificates are stored in Java keystores in the
certificates
folder
Recovery from node crashes
If the node crashes:
- The database and the contents of the
certificates
folder will not be affected - In-flight flows can be restarted from their most recent checkpoint
- Artemis messages can be replayed
In other words, you can generate a new node, re-add the persistence.mv
file, certificates
folder and CorDapps, and the node will behave as if nothing happened when you start it up again.
Recovery from corruption/deletion of the node's files
Loss/corruption of data is non-fatal as long as you are able to recover:
- The node's database
- The contents of the node's
certificates
folder
It is the responsibility of the node's owner to ensure they protect and back-up these files using standard business procedures. If both of these can be recovered and re-added to a new node, the node should spin up as usual.
If the contents of the node's certificates
folder cannot be recovered, you will no longer have your private key, and will not be able to spend your assets on the ledger.
If certain pieces of data cannot be recovered from the node's database, the node could attempt to re-request this data from other nodes where applicable (e.g. the transaction history). However, there is no way to force the counterparties to share this information.
这篇关于如何备份/还原Corda节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!