According to
bitnodes.io I run the only BTC Full Node (Core v22; 24/7; on Win 11 GUI) in the Dominican Republic. In addition I also run a DAO Full Node, bisq, which recognizes and utilizes the BTC blockchain. Maybe one day I will trade on bisq IF I can figure it out! Meanwhile, I am just enjoying the technology and supporting decentralization.
As you know, the worst thing that can happen is an unintended pc shutdown (e.g. power outage) that prevents a Core shutdown and leads to various kinds of corruption. Having to uninstall and re-start IBD from the genesis block is a major hassle tantamount to having to do a clean OS install after an irrecoverable OS crash.
In spite of having a UPS and an AC/DC inverter for the house, I am now on IBD #3, with days to go. And the Dex DAO is suspended until I can reach current block height. 5 seconds faulty Win shutdown = Disaster.
The purpose of this post is to collate Core Recovery Options. Some of the information I have gleaned from posts in this sub-forum. But I want to start a thread that puts the general recommendations in one place as well as encouraging other members to correct me and to add more information.
The context here is for OS Windows, the GUI program:
(1) After re-booting and confirming failure of the program to start, the first step is fact finding. Even though you cannot start the program, you can still inspect
debug for errors. Go to the Bitcoin folder. The filepath is: C:\Users\YourName\AppData\Roaming\Bitcoin. Open the Bitcoin directory and look for
debug. Click on that.
Remember that the debug file starts at the top in the past and proceeds down to the bottom in the present, so scroll down. Look for an error and/or a suggested solution, write them down, and continue. If not self-explanatory, you could copy/paste and google or c/p to this sub-forum.
(2) If that doesn’t work, do a
reindex. Go to the Core application program in Downloads: bitcoin-22.0-win64-setup. Right click properties. Next to the Bitcoin logo you will find a writable field. Type in this flag:
. . . setup –reindex
and click Apply. I have seen instances where the flag is designated with one hypen; others with a double hypen. I think that the double hyphen is correct.
(3) Another option, and it is one I’m most unsure about, is a backup of the entire core data directory which then enables a replacement of the corrupted directory with a known good one.
This is the filepath to the directory:
C:\Users\MyName\AppData\Roaming\Bitcoin\blocks
The data directory is
Bitcoin and it includes the subfolder
blocks.
I have copy/pasted
Bitcoin to an external drive. The question is:
Will copy/pasting the known good data directory to the corrupted one solve the corruption problem? Is it as simple as re-booting and starting fresh with the one exception that the new program will have to re-build to the current height?
Some thoughts:
a. Copy/paste or delete old and replace new?
b. Ditto EXCEPT do this only with the
blocks subfolder?
c. Since the contents of the data directory are dynamic, the data increasing roughly every ten minutes, you would need to do a backup frequently. It could be that a copy/paste of new over old will replace extant files and add new.
Based on your responses, I’m most interested in finding out if a complete backup and restore is possible.