Author

Topic: Blockchain restore requiring complete Re-Indexing (Read 1373 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
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«.  Huh

Just trying to rebuild everything from scratch with an empty wallet and later on reimport my keys.  Embarrassed  I'll keep you posted.
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.
newbie
Activity: 21
Merit: 0
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«.  Huh

Just trying to rebuild everything from scratch with an empty wallet and later on reimport my keys.  Embarrassed  I'll keep you posted.
legendary
Activity: 1148
Merit: 1006
@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?
newbie
Activity: 21
Merit: 0
@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.
legendary
Activity: 1148
Merit: 1006
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.
newbie
Activity: 21
Merit: 0
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.
Jump to: