lotus 1.16.0 最小快照导出 导入 (转)
原文地址:https://mixboot.blog.csdn.net/article/details/126065029
lotus 1.16.0 最小快照导出 导入
系列文章目录
前言
一、lotus
二、导出最小快照
1.后台导出快照
三、导入快照
四、运行 lotus
五、导出快照时间
参考
前言
lotus 1.16.0 最小快照
一、lotus
# lotus --version
lotus version 1.16.0+mainnet+git.01254ab32
1
2
二、导出最小快照
1.后台导出快照
screen -S chia
1
lotus chain export --recent-stateroots=901 --skip-old-msgs my-snapshot.car
1
快照导出完成
68G Jul 29 12:26 my-snapshot.car
1
三、导入快照
参考
lotus daemon stop
mv ~/.lotus/datastore/chain ~/.lotus/datastore/chain_backup
mkdir ~/.lotus/datastore/chain
lotus daemon --import-snapshot my-snapshot.car --halt-after-import
lotus daemon
lotus sync status
lotus sync wait
1
运行
lotus daemon stop
1
# mv lotus/datastore/chain/ lotus/datastore/chain_backup
# mkdir lotus/datastore/chain
# du -sh lotus/datastore/*
1
2
3
导入快照
lotus daemon --import-snapshot my-snapshot.car --halt-after-import
1
四、运行 lotus
nohup lotus daemon > /seal/daemon.log 2>&1 &
1
五、导出快照时间
最小快照导出时间1h30m
# cat daemon.log | grep export
2022-07-29T10:54:35.818+0800 INFO chainstore store/snapshot.go:171 export started
2022-07-29T12:10:28.248+0800 INFO chainstore store/snapshot.go:103 export {"height": "2024640"}
2022-07-29T12:13:22.675+0800 INFO chainstore store/snapshot.go:103 export {"height": "2021760"}
......
2022-07-29T12:26:59.062+0800 INFO chainstore store/snapshot.go:103 export {"height": "2880"}
2022-07-29T12:26:59.627+0800 INFO chainstore store/snapshot.go:103 export {"height": "0"}
2022-07-29T12:26:59.722+0800 INFO chainstore store/snapshot.go:182 export finished {"duration": 5543.90347304}
参考
Compacting the chain data
————————————————
版权声明:本文为CSDN博主「mixboot」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u010953692/article/details/126065029