Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: ez1btc on May 23, 2012, 10:07:26 PM

Title: trying to use "dumpprivkey," bitcoind wont connect to server (BOUNTY)
Post by: ez1btc on May 23, 2012, 10:07:26 PM
my bitcoin client crashes every time with a 22db runrecovery error. i am trying to get my private keys out of my wallet with the bitcoind dumpprivkey function, however bitcoind says it "cant connect to server." offering a bounty of 5 BTC to 40 BTC for useful advice on exporting my private keys from my bitcoin-qt wallet to my wallet.


Title: Re: trying to use "dumpprivkey," bitcoind wont connect to server (BOUNTY)
Post by: Stephen Gornick on May 24, 2012, 09:16:05 AM
It sounds like the BDB database might not have been shut down properly or for some other reason cannot use its log file to recover.  The error doesn't say which datafile has the problem.

Firstly, make sure you have made a backup of your wallet.dat

If the problem is with some file other than wallet.dat (which is more likely to be true) then you can use a utility that only uses wallet.dat.

There is a utility, pywallet, which will let you export the keys.


e.g.,  $ ./ --dumpwallet --password="my encryption passphrase"

Otherwise, to do this within the bitcoin client you'ld need to either delete the blockchain and other data, index and log files (or pull a clean copy from the nightly snapshot).  This will hopefully let you start up the client then.

As far as why you were getting the "can't connect to server" was probably because you weren't running a bitcoind server.  Create a bitcoin.conf with rpcuser= and rpcpassword= , and then e.g..,
  $ ./bitcoin-qt -server
  $ ./bitcoind dumpprivkey [bitcoin address]
(if you have passphrase encryption, you'll need to open  it first, e.g., for 1000 seconds)

  $ ./bitcoind walletpassphrase [passphrase] 1000

  $ ./bitcoind dumpprivkey [bitcoin address]

then close bitcoin-qt when done.

Title: Re: trying to use "dumpprivkey," bitcoind wont connect to server (BOUNTY)
Post by: Bitsky on May 24, 2012, 05:09:33 PM
In case you are running a Linux system, there's a thread about a recovery tool which scans for private keys on formatted devices.

To make the scan quick, you could create a small file (~10MB), partition+format it and then loop mount that as another device. Copy your wallet onto that device and try to scan this device.

If you're on Windows, maybe one of the trusted members here would take a look at your wallet.

Granted the thread is a little old, but maybe the tool still works: