Polkadot Runbook
Polkadot DB Clean up
Description: This runbook is to clean up Polkadot service DB if it is corrupted and not syncing.
Action:
-
Stop the node
docker stop <container> -
Delete the DB
rm -R <dataDirPath>/chains/<ksmcc3|polkadot>/db -R -
Download the chaindata snapshot
aria2c -x5 -o temp_file https://<ksm|dot>-rocksdb.polkashots.io/snapshot -
Extract the snapshot into data directory
lz4 -c -d temp_file | tar -x -C <DataDirPath>/chains/<ksmcc3|polkadot>/ -
Check the
dbdirectory is createddu -sh <DataDirPath>/chains/<ksmcc3|polkadot>/db -
Start the container and check the logs
Docker logs <container> -
Check the node by searching the name on telemetry and comparing
block numberwith the other public nodes.For Kusama: https://telemetry.polkadot.io/#/0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe
For Polkadot: https://telemetry.polkadot.io/#list/0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3