Safely interrupt -reindex?

6

2

My database became corrupted and I had to reindex:

bitcoind --daemon -reindex

It takes my computer quite some time and CPU power. It's been running for an hour but it will take at least 4 more hours to finish. With this high a load, I can't do my work on it, so I'd like to interrupt this process without losing the current progress, and continue later. Is that possible?

Reinstate Monica

Posted 2014-12-02T08:41:27.793

Reputation: 913

Answers

8

Yes. You can just stop bitcoind (using bitcoin-cli stop, or just killing it with SIGINT). Next time invoke it without -reindex, and it will continue from where it left off. If you do pass -reindex again, it will start over.

Pieter Wuille

Posted 2014-12-02T08:41:27.793

Reputation: 54 032

1If on Unix, you could also suspend it by "killing" with SIGSTOP, and then "kill" with SIGCONT to resume.Nate Eldredge 2014-12-02T22:34:16.407

I have started reindex and after 92% done and again same error comeCodebrekers 2018-06-19T13:07:38.777

What error? It may be CPU overheating, or a disk error. Bitcoin's validation is very intensive.Pieter Wuille 2018-06-19T15:16:35.277