Page 1 of 1

Fixing Corrupted Wallets

Posted: Wed Jan 14, 2015 7:59 pm
by phelix
I managed to badly corrupt an relatively important (and large) wallet. The client and various tools like fixwallet and pywallet bailed on opening with errors like:
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.
Finally I got it fixed by using the berkeley db tools db_recover and db_dump (on windows these can be obtained for example by building berkeley db with easywinbuilder included in the namecoin source under contrib) and then reimporting the private keys with a modified pywallet version.