首页 > 其他分享 >OpenEthereum数据备份

OpenEthereum数据备份

时间:2023-02-16 11:23:02浏览次数:51  
标签:02 11 16 0.0 数据备份 2023 openethereum OpenEthereum

数据导出

导出数据格式

openethereum [options] export blocks --format=[FORMAT] --from=[BLOCK] --to=[BLOCK] [FILE]

停止服务

# systemctl stop openethereum

导出数据

# ./openethereum --chain /usr/local/openethereum/node.json --config /usr/local/openethereum/node.toml  --base-path /data/openethereum/node  export blocks --from=0 --to=50000 node
Loading config file from /usr/local/openethereum/node.toml
2023-02-16 10:48:58  Not preparing block; cannot sign.
2023-02-16 10:48:58  Configured for Hashii using AuthorityRound engine
2023-02-16 10:49:00  #0
2023-02-16 10:49:01  #10000
2023-02-16 10:49:01  #20000
2023-02-16 10:49:01  #30000
2023-02-16 10:49:02  #40000
2023-02-16 10:49:02  #50000
2023-02-16 10:49:02  Export completed.

数据导入

导入数据格式

openethereum [options] import --format=[FORMAT] [FILE]

停止服务

# systemctl stop openethereum

导入数据

./openethereum --chain /usr/local/openethereum/node.json --config /usr/local/openethereum/node.toml  --base-path /data/openethereum/node import node
2023-02-16 10:54:42  Not preparing block; cannot sign.
2023-02-16 10:54:42  Configured for Hashii using AuthorityRound engine
2023-02-16 10:54:42  Signal for switch to contract-based validator set.
2023-02-16 10:54:42  Initial contract validators: [0x884c9b21053196121cb3f6cc51da2665766d787c, 0x8513b289b60c978833e935ff59501266c5588855]
2023-02-16 10:54:45  Not preparing block; cannot sign.
2023-02-16 10:54:47  Syncing   #26431 0x97f0…8c1f  5286.00 blk/s    0.0 tx/s    0.0 Mgas/s      0+21247 Qed    8 MiB chain 32 MiB queue  
2023-02-16 10:54:51  Import completed in 9 seconds, 50000 blocks, 5322 blk/s, 0 transactions, 0 tx/s, 0 Mgas, 0 Mgas/s

查看节点数据同步

2023-02-16 11:12:17  Starting OpenEthereum/v3.3.4-stable-f2dd855-20220704/x86_64-linux-gnu/rustc1.62.0
2023-02-16 11:12:17  Keys path /data/openethereum/node/keys/hashii
2023-02-16 11:12:17  DB path /data/openethereum/node/chains/hashii/db/c30b5bb34be386bf
2023-02-16 11:12:17  State DB configuration: fast
2023-02-16 11:12:17  Operating mode: active
2023-02-16 11:12:17  Not preparing block; cannot sign.
2023-02-16 11:12:18  Configured for Hashii using AuthorityRound engine
2023-02-16 11:12:18  Listening for new connections on 0.0.0.0:8546.
2023-02-16 11:12:18  Removed existing file '/data/openethereum/node/jsonrpc.ipc'.
2023-02-16 11:12:18  Started prometeus metrics at http://0.0.0.0:3000/metrics
2023-02-16 11:12:20  Not preparing block; cannot sign.
2023-02-16 11:12:23  Public node URL: enode://d388dd4345f748d2b2fdfa6bdfb5a68f0de0a3c50d9eeeb29d39e8e3aec8c1fa2e7701bf519e69766b2ba2937ac7f365d31a26264499f91d3b3169bb7e952e37@172.16.1.11:30300
2023-02-16 11:12:33  Syncing   #69300 0x1d58…05d1  1287.46 blk/s    0.0 tx/s    0.0 Mgas/s      0+26040 Qed LI:#95339    1/25 peers      7 MiB chain   39 MiB queue  RPC:  0 conn,    5 req/s,   25 µs
2023-02-16 11:12:38  Syncing   #89417 0x93b8…3338  4023.40 blk/s    0.0 tx/s    0.0 Mgas/s      0+24903 Qed LI:#114389    1/25 peers     13 MiB chain   38 MiB queue  RPC:  0 conn,    5 req/s,   30 µs
2023-02-16 11:12:43  Syncing  #109730 0x8133…d61c  4062.60 blk/s    0.0 tx/s    0.0 Mgas/s      0+25360 Qed LI:#135090    1/25 peers     13 MiB chain   38 MiB queue  RPC:  0 conn,    4 req/s,   44 µs
2023-02-16 11:12:48  Syncing  #129417 0x267d…2cb1  3937.40 blk/s    0.0 tx/s    0.0 Mgas/s      0+24748 Qed LI:#154267    1/25 peers     13 MiB chain   37 MiB queue  RPC:  0 conn,    5 req/s,   31 µs
2023-02-16 11:12:53  Syncing  #149820 0x775b…c21d  4080.60 blk/s    0.0 tx/s    0.0 Mgas/s      0+24514 Qed LI:#174333    1/25 peers     13 MiB chain   37 MiB queue  RPC:  0 conn,    5 req/s,   30 µs
2023-02-16 11:12:58  Syncing  #170156 0x85b9…9c4f  4067.20 blk/s    0.0 tx/s    0.0 Mgas/s      0+26149 Qed LI:#196304    1/25 peers     13 MiB chain   40 MiB queue  RPC:  0 conn,    5 req/s,   34 µs

snapshot

快照格式

openethereum [options] snapshot --at=[BLOCK] <FILE>
openethereum [options] restore [FILE]

停止服务

# systemctl stop openethereum

生成快照

# ./openethereum --chain /usr/local/openethereum/node.json --config /usr/local/openethereum/node.toml  --base-path /data/openethereum/node snapshot --at=50000 snapshot_data
Loading config file from /usr/local/openethereum/node.toml
2023-02-16 10:57:55  Not preparing block; cannot sign.
2023-02-16 10:57:55  Configured for Hashii using AuthorityRound engine
2023-02-16 10:57:55  Snapshots are currently experimental. File formats may be subject to change.
2023-02-16 10:57:55  Taking snapshot starting at block 50000
2023-02-16 10:57:55  Using 16 threads for Snapshot creation.
2023-02-16 10:57:55  produced 12 state chunks and 1 block chunks.
2023-02-16 10:57:55  Re-enabling pruning.
2023-02-16 10:57:55  snapshot creation complete
2023-02-16 10:58:00  Not preparing block; cannot sign.

还原快照

# ./openethereum --chain /usr/local/openethereum/node.json --config /usr/local/openethereum/node.toml  --base-path /data/openethereum/node restore snapshot_data
Loading config file from /usr/local/openethereum/node.toml
2023-02-16 11:01:00  Not preparing block; cannot sign.
2023-02-16 11:01:00  Configured for Hashii using AuthorityRound engine
2023-02-16 11:01:00  Snapshot restoration is experimental and the format may be subject to change.
2023-02-16 11:01:00  On encountering an unexpected error, please ensure that you have a recent snapshot.
2023-02-16 11:01:00  Attempting to restore from snapshot at 'snapshot_data'
2023-02-16 11:01:00  Restoring to block #50000 (0x0xcc0c6609866eb64bd891b5d906e2b97e750e31fa08240fe28b3687900f5d071d)
2023-02-16 11:01:00  Restoring state
2023-02-16 11:01:00  Processed 0/12 state chunks and 0/1 block chunks.
2023-02-16 11:01:00  Restoring blocks
2023-02-16 11:01:00  First new block calculated: 0xcc0c6609866eb64bd891b5d906e2b97e750e31fa08240fe28b3687900f5d071d
2023-02-16 11:01:00  Migrated 0 ancient blocks
2023-02-16 11:01:00  Restoration complete.

查看节点数据同步

2023-02-16 11:02:20  Starting OpenEthereum/v3.3.4-stable-f2dd855-20220704/x86_64-linux-gnu/rustc1.62.0
2023-02-16 11:02:20  Keys path /data/openethereum/node/keys/hashii
2023-02-16 11:02:20  DB path /data/openethereum/node/chains/hashii/db/c30b5bb34be386bf
2023-02-16 11:02:20  State DB configuration: fast
2023-02-16 11:02:20  Operating mode: active
2023-02-16 11:02:20  Not preparing block; cannot sign.
2023-02-16 11:02:20  Configured for Hashii using AuthorityRound engine
2023-02-16 11:02:20  Downloading old blocks from 0x6448eef774303a2cf1f95c7ba02682f670ddca2dc30b5bb34be386bf9422990c (#0) till Some(0xcc0c6609866eb64bd891b5d906e2b97e750e31fa08240fe28b3687900f5d071d) (#Some(50000))
2023-02-16 11:02:20  Listening for new connections on 0.0.0.0:8546.
2023-02-16 11:02:20  Removed existing file '/data/openethereum/node/jsonrpc.ipc'.
2023-02-16 11:02:20  Started prometeus metrics at http://0.0.0.0:3000/metrics
2023-02-16 11:02:25  Not preparing block; cannot sign.
2023-02-16 11:02:25  Public node URL: enode://d388dd4345f748d2b2fdfa6bdfb5a68f0de0a3c50d9eeeb29d39e8e3aec8c1fa2e7701bf519e69766b2ba2937ac7f365d31a26264499f91d3b3169bb7e952e37@172.16.1.11:30300
2023-02-16 11:02:35  Syncing   #50845 0xb0da…26f8    56.37 blk/s    0.0 tx/s    0.0 Mgas/s      0+26460 Qed Ancient:#0 LI:#77305    2/25 peers    244 KiB chain   40 MiB queue  RPC:  0 conn,    3 req/s,   33 µs
2023-02-16 11:02:40  Syncing   #71465 0xe582…53fc  4124.62 blk/s    0.0 tx/s    0.0 Mgas/s      0+24589 Qed Ancient:#0 LI:#96228    2/25 peers      7 MiB chain   37 MiB queue  RPC:  0 conn,    2 req/s,   33 µs
2023-02-16 11:02:45  Syncing   #91584 0xb9d8…038c  4023.80 blk/s    0.0 tx/s    0.0 Mgas/s      0+24710 Qed Ancient:#0 LI:#116294    2/25 peers      7 MiB chain   37 MiB queue  RPC:  0 conn,    3 req/s,   36 µs

标签:02,11,16,0.0,数据备份,2023,openethereum,OpenEthereum
From: https://www.cnblogs.com/wangguishe/p/17124562.html

相关文章

  • Redis数据持久化、数据备份、数据的故障恢复
    1.redis持久化的意义----redis故障恢复在实际的生产环境中,很可能会遇到redis突然挂掉的情况,比如redis的进程死掉了、电缆被施工队挖了(支付宝例子)等等,总之一定会遇到各......
  • 公司数据备份管理制度
    公司数据备份管理制度第一篇:公司数据备份管理制度公司数据备份管理制度为规范备份管理工作,合理存储历史数据及保证数据的安全性,防止因硬件故障、意外断电、病毒等因素造......
  • mysql-数据备份
    1、准备一个mysql数据库1、查看mysql数据库可以看到此时mysql中没有测试数据库bkdatabase。]#/usr/local/mysql-5.7.28-el7-x86_64/bin/mysql-uroot-pmysql>sho......
  • Rsync 远程同步数据备份
    拓补图:推荐步骤:一。在Centos1服务器安装rsync服务创建创建同步源名字www,同步源根目录为/www,同步数据验证账户为bob密码为pwd@123,将数据同步到服务器本地/benet目......
  • mysql8.0 --mysqldump数据备份
     mysqldump数据,可以把用户名写在配置文件的[mysqldump]中但是这里只能写一个用户名和密码,如果一个数据库里有多个用户和数据库怎么分开备份。1、创建一个备份的用户test......
  • mysql dump数据备份
    @echooffset"Ymd=%date:,4%%date:5,2%%date:~8,2%"D:\develop\mysql-5.7\mysql-5.7.26-winx64\bin\mysqldump-uroot-p1234--single-transaction--databasesdb>D:......
  • mysql数据如何恢复到任意时间节点?mysql数据恢复,mysql数据备份
    文章目录​​写在前面​​​​数据备份与恢复​​​​1、全量备份​​​​模拟全量备份与恢复​​​​全量备份的缺点​​​​2、增量备份​​​​模拟增量备份与恢复​​​......
  • chrome 浏览器手动同步更新书签数据备份
    现在很多人会使用浏览器自带的同步工具,这样即使换了电脑,对于这个浏览器来说,与没换电脑一样,这就是同步的作用。chrome浏览器,只要有网络,只要登录了账号是自动同步的,所......
  • 数据备份之数据保护中的稳定点
    通常在对数据进行备份时,存在以下三种数据保护的一致性:1、不一致备份(In-consistentbackup),表示备份的数据是正在改变的数据;2、崩溃一致备份(Crash-consistentbackup),表示备......
  • MySQL安全管理数据备份与还原
    MySQL安全管理数据备份与还原数据备份与还原分为1)单表数据备份与还原2)文件备份与还原3)SQL备份与还原备份与还原的基本概念什么是备份备份:backup,将数据或者结......