Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: AndrewBUD on September 11, 2012, 09:53:42 PM



Title: How to export private key to new wallet
Post by: AndrewBUD on September 11, 2012, 09:53:42 PM
I am having a hell of a time getting my wallet to work again... It seems like it starts to download the blockchain and get's frozen.



I have one address that is locked in to a couple pools I use and I do not want to lose it ...


Any help is much appreciated..


Sorry still editing :)


https://en.bitcoin.it/wiki/Importprivkey

I got to this..... Can someone please give me an example of how to do this: I start a new wallet from scratch... I open bitcoind and use the command: importprivkey (what comes after this command)


Title: Re: How to export private key to new wallet
Post by: Stephen Gornick on September 11, 2012, 11:15:06 PM
I start a new wallet from scratch...

Why?  The blockchain download halting probably has nothing to do with your wallet.

In fact, you can re-download the blockchain with the empty wallet.dat, then replace that empty one with the wallet.dat from your backup.  (of course, shut down the client before copying the wallet.dat over.)

There's no need to import private keys.

As far as why that might hack stopped downloading, there are a couple things that could be happening.  Firstly, are you using the recent release (e.g.., v0.6.3?)

If so, does the client show connections?

A debug.log can help troubleshoot why the blockchain download might not have completed.  But that is completely separate from any wallet.dat issue you think you might be having.


Title: Re: How to export private key to new wallet
Post by: AndrewBUD on September 11, 2012, 11:55:56 PM
My reasoning behind this is that: when it get's near the end of downloading the blockchain it uses a ton of CPU and takes days to finish....


I am confused...... I have the blockchain downloaded with the blk files... and blkindex but even after rescanning it starts downloading it from scratch.... 


Title: Re: How to export private key to new wallet
Post by: AndrewBUD on September 12, 2012, 12:11:27 AM
Another question.... Using any light client, can you export a key? or does that only work with the qt client?


Title: Re: How to export private key to new wallet
Post by: casascius on September 12, 2012, 12:12:37 AM
Isn't there a dumpwallet or similar command?  That'd be the one you want.


Title: Re: How to export private key to new wallet
Post by: AndrewBUD on September 12, 2012, 12:22:46 AM
I found this:

$ bitcoind help
[...]
  importprivkey <bitcoinprivkey> [label]


BUT,, I have never used bitcoind and I tend to break stuff unless someone tells me what to do, I always seem to get different answers when googling certain topics....


Thanks




Title: Re: How to export private key to new wallet
Post by: Stephen Gornick on September 12, 2012, 09:47:20 AM
My reasoning behind this is that: when it get's near the end of downloading the blockchain it uses a ton of CPU and takes days to finish....

That has nothing to do with your wallet.dat and everything to do with the makeup of the blockchain (thanks to SatoshiDICE which started on stong at about 95% of the blockchain).


So, ... unless your wallet.dat is corrupt or something, that is not your problem.


As far as it re-downloading the blockchain, I'm not sure why that would be doing that. 

Also, if you are on an encrypted filesystem that will really slow you down for blockchain downloads.

As far as a client, such as Electrum or MultiBit, yes, the key(s) can be exported. The wallet formats are different.  You can import private keys into electrum I believe.

Personally, I use Blockchain.info for my daily wallet as that is accessible via web and mobile app.  It is a hybrid EWallet, doesn't have access to your private keys.

But that too would require that you export your keys and transfer them.  Letting the client complete the download is probably your safest point forward, then send a payment to empty your wallet rather than importing keys.


Title: Re: How to export private key to new wallet
Post by: AndrewBUD on September 12, 2012, 10:58:56 AM
I understand.... I am letting it redownload I am stuck using one of my rigs boards at the moment... damn dual cores are very slow....



Thanks for your help....