Bitcoin Forum
November 11, 2024, 04:45:11 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: DB_RUNRECOVERY: Fatal error, run database recovery 30974  (Read 869 times)
bobvan (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 30, 2013, 02:18:20 AM
 #1

I've found several other threads here discussing the error message in the subect. Some comments have been helpful in leading me to the answer, but none I could find here had the simple fix that worked for me. I gather that the fix is only recently possible, so that's understandable. Someday when I'm no longer classified as a newbie, I'll post updates in the other threads. Until then, I hope this post generates enough Google juice to help somebody else who's searching for a solution to this problem.

First, a bunch of words from related posts that might help other Googlers land here: pywallet extract privkey wallet.dat corrupt salvage jackjack rescan

My experience is with Linux and this advice will be relative to Linux, but I believe it'd work for Windows too, but with the proper "translation."

Let me also add that I first tried just removing everything in .bitcoin/ except for wallet.dat and rebuilding. I tried it several times. I'd get the blockchain resync'd up to a few thousand blocks from the end and then it'd error out again. I have a hunch that the error came around time of the fork of March 2013, but I don't have the data to back that up.

The fix that worked for me was to use the -salvagewallet option to bitcoind. Not sure when this was added, but if your version doesn't have it, then I'd recommend that you backup and upgrade before doing anything else.

Very easy to apply the fix. Stop all bitcoin processes. Move or copy the old .bitcoin directory, leaving nothing but the suspicious wallet.dat file. Start bitcoind -salvagewallet

That'll take a while because you wait for the whole chain, but it worked for me. My wallet had been out of sync for years due to various crashes, impolite shutdowns, filesystems run out of space, etc. If you're closer to current, you might be able to get by without blowing away everything but wallet.dat.

Thanks to others who reported their problems and to those who started me down paths that eventually led to a solution.

      Bob
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!