2

I got this issue in my prod chain How can we restart the chain if it becomes stuck during data migration?

I am not able to start the chain. Is there any way to start the chain with existing database.

2
  • 1
    you can add --base-path /path/to/database flag when starting the chain. if you are doing --dev I think your database will be in the /tmp which will be deleted every new start.
    – Yeou
    Commented Sep 26, 2023 at 1:21
  • Its not working
    – Pankaj
    Commented Oct 9, 2023 at 16:46

1 Answer 1

1

For that first we need to export the state of the chain on any given blocknumber.

./target/release/chain-node export-state --chain=currentChainSpecRaw.json --base-path /Users/pcs/documents/node01 1000 > chain-exported-100.json

Then you need to start the the chain with the exported chainspec.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.