Title: Blockchain restore requiring complete Re-Indexing Post by: tt_1111 on July 07, 2015, 05:11:11 PM With Bitcoin client v9.x it was possible to backup the complete blockchain. In state of a computer crash somehow corrupting the blockchain a simple restore of the whole backuped directory except the wallet.dat got everything right fast — the Bitcoin client only had to catch up on the last blocks since the backup and everything was fine again within a quarter of an hour.
With Bitcoin client v10.x this procedure doesn't work any more. Keeping the wallet.dat and restoring everything else inevitably and reproducably results in a complete re-indexing of the whole blockchain from scratch. And even though this re-indexing utilizes the blocks already available on the local HDD and not downloading the whole blockchain again, it takes hour by hour by hour with high CPU and near to 100% HDD load. Of course I could try restoring the old wallet, too — and use the 'rescan' option to retrieve transactions missing in my wallet from the blockchain. But this also is a time-devouring process as it has to scan the whole blockchain. Thus my question: Is there an easy and time-saving way to backup and restore the whole blockchain whilst keeping the latest version of the wallet.dat with Bitcoin client v10.x? Of course the BTC client was NOT running when I did the backup and the restore. To no avail as described above. I'm obliged for every working hint. In case there is no easy solution (as far as I got it there's a new approach to retrieving Blockchain and indices in BTC client v10) the above can be considered a feature request. It shouldn't be acceptable that each and every crash causes an 8-12 hours delay before you're able to use your wallet again. Title: Re: Blockchain restore requiring complete Re-Indexing Post by: bitcoinmasterlord on July 08, 2015, 01:28:08 PM Thanx for the info Looks like a post spammer who tries to raise his post count in order to level up. Reporting him now. @Threadstarter why don't you simply manually back up the blockchain. Create a batchscript that does this for you and you should be safe. Title: Re: Blockchain restore requiring complete Re-Indexing Post by: tt_1111 on July 08, 2015, 05:34:15 PM @bitcoinmasterlord:
Hmm — I did manually back up the whole blockchain, of course after having shut down the BTC client. The next day my computer crashed while bitcoin-qt.exe was running, thus corrupting the blockchain. After restarting I kept the wallet (there had been a few transactions since the backup), but restored everything else (e.g. the whole blockchain including indices). This procedure was working fine with client v9.x; it took a quarter of an hour to catch up on the latest blocks and everything was working again. The same procedure (full backup and full restore except the wallet.dat) failed miserably after I upgraded to Bitcoin client v10.x. Unavoidably and strictly reproducibly the program told me of a corrupted index and started to re-index the whole blockchain, taking at least a quarter of a day to get up to date and being able to perform any transactions. Putting that procedure into a kind of scheduled batch script ain't no problem, however I seriously doubt it solves the problem described. Looks like the wallet.dat (or the registry?) carries some time stamp of last block or so, and if that doesn't match with the time stamp of the last block (or index?) actually found on the HDD, in client v10.x the blockchain index is automatically considered corrupted, even if it is perfectly legit at the backup time. Title: Re: Blockchain restore requiring complete Re-Indexing Post by: bitcoinmasterlord on July 09, 2015, 05:38:13 PM @bitcoinmasterlord: Hmm — I did manually back up the whole blockchain, of course after having shut down the BTC client. The next day my computer crashed while bitcoin-qt.exe was running, thus corrupting the blockchain. After restarting I kept the wallet (there had been a few transactions since the backup), but restored everything else (e.g. the whole blockchain including indices). This procedure was working fine with client v9.x; it took a quarter of an hour to catch up on the latest blocks and everything was working again. The same procedure (full backup and full restore except the wallet.dat) failed miserably after I upgraded to Bitcoin client v10.x. Unavoidably and strictly reproducibly the program told me of a corrupted index and started to re-index the whole blockchain, taking at least a quarter of a day to get up to date and being able to perform any transactions. Putting that procedure into a kind of scheduled batch script ain't no problem, however I seriously doubt it solves the problem described. Looks like the wallet.dat (or the registry?) carries some time stamp of last block or so, and if that doesn't match with the time stamp of the last block (or index?) actually found on the HDD, in client v10.x the blockchain index is automatically considered corrupted, even if it is perfectly legit at the backup time. Does sound like no fun dealing with. I don't know why they don't allow to check the old blockchain data. I mean its most probably not fully corrupted. Backing up the whole directories into a winrar archive is no solution? You would lose a day of things but at least no full reload. And when you have such problems, then downloading a blockchain file directly from the net doesn't work too, i guess. Maybe ask about that in the wallet subforum again? Title: Re: Blockchain restore requiring complete Re-Indexing Post by: tt_1111 on July 09, 2015, 06:45:49 PM Hi,
it shouldn't matter whether I backup the whole bitchain onto another drive (which I currently do) or into an archive file. Of course you may further investigate this, maybe others have made similar experiences. Another possibility: My wallet contains some hidden error since some time. Don't know how this should even be possible. Anyhow with the backuped wallet I'm experiencing frequent crashes of bitcoin-qt.exe v10.2 lately. When looking into the debug.log I see an error message that some *.ldb file in the \chainstate subdir »possibly contains some virus and thus the program couldn't proceed safely«. ??? Just trying to rebuild everything from scratch with an empty wallet and later on reimport my keys. :-[ I'll keep you posted. Title: Re: Blockchain restore requiring complete Re-Indexing Post by: achow101 on July 09, 2015, 07:13:32 PM Hi, Do you have an active antivirus? It might be detecting something in the databases and changing the ldb files causing the corruption. Also, that error should not show up in the debug.log since Bitcoin doesn't check for viruses AFAIK.it shouldn't matter whether I backup the whole bitchain onto another drive (which I currently do) or into an archive file. Of course you may further investigate this, maybe others have made similar experiences. Another possibility: My wallet contains some hidden error since some time. Don't know how this should even be possible. Anyhow with the backuped wallet I'm experiencing frequent crashes of bitcoin-qt.exe v10.2 lately. When looking into the debug.log I see an error message that some *.ldb file in the \chainstate subdir »possibly contains some virus and thus the program couldn't proceed safely«. ??? Just trying to rebuild everything from scratch with an empty wallet and later on reimport my keys. :-[ I'll keep you posted. |