Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: JBinRoc on December 28, 2017, 04:53:01 PM



Title: Faster way to recover bitcoin core wallet re: verifying blockchain
Post by: JBinRoc on December 28, 2017, 04:53:01 PM
I had a hard drive crash recently, but fortunately I backed up my bitcoin core wallet as of early November. However I did not back up the 145Gb+ of blockchain that goes with it.  The last time something like this happened I had to re-verify the entire blockchain and it took me almost three weeks of letting the computer run overnight.  Unfortunately I am stuck with the same slow computer for now.  Is there any other, faster way to recover a bitcoin core wallet? 


Title: Re: Faster way to recover bitcoin core wallet re: verifying blockchain
Post by: bob123 on December 28, 2017, 05:27:14 PM
If you want to use core as your wallet furthermore you will have to sync the blockchain.
But if you just want to export the private keys and import them into another wallet (e.g. electrum[1]) you can using these commands in the console of core:

Code:
walletpassphrase YOUR_PASSWORD
to unlock your wallet (if encrypted), and:
Code:
dumpwallet c:\path\to\your\dumped\privkeys.txt
to dump all of your private keys into a .txt file.

Afterwards you can copy all of your private keys from the .txt file and import (of better: sweep) them into electrum.
To do this you have to (after creating a new wallet in electrum) go to the Wallet menu -> Private keys -> sweep.
You can paste all your private keys at once (one per line).

After sweeping your coins, all of your btc's will be sent to the electrum wallet (No longer backed up by your core-backup).
So, in this case, make sure to backup your electrum-wallet (12-word seed phrase when creating wallet).


[1] https://electrum.org/#home


Title: Re: Faster way to recover bitcoin core wallet re: verifying blockchain
Post by: aleksej996 on December 28, 2017, 08:06:14 PM
You should know that Bitcoin Core improved it's initial sync time in one of the recent versions (I think 0.15).
It is now twice faster, I think.
It is rare that it takes more than a week for the initial sync, but I understand this can still be a lot of time for someone.
If you are in a hurry, then you will have to either use the other wallet or lose all the security that running a full node provides.


Title: Re: Faster way to recover bitcoin core wallet re: verifying blockchain
Post by: LoyceV on December 28, 2017, 08:20:00 PM
You don't need to "recover" your wallet, you just need to load it. The difference is that your coins aren't lost yet. Did you make another backup of your wallet, to be sure this doesn't happen?

It is rare that it takes more than a week for the initial sync, but I understand this can still be a lot of time for someone.
It still depends on your hardware (I used to run a backup-chain on my old netbook with 1 GB ram, but gave up as it takes months to sync).


Title: Re: Faster way to recover bitcoin core wallet re: verifying blockchain
Post by: idelcoins on December 28, 2017, 10:54:33 PM
I had a hard drive crash recently, but fortunately I backed up my bitcoin core wallet as of early November. However I did not back up the 145Gb+ of blockchain that goes with it.  The last time something like this happened I had to re-verify the entire blockchain and it took me almost three weeks of letting the computer run overnight.  Unfortunately I am stuck with the same slow computer for now.  Is there any other, faster way to recover a bitcoin core wallet? 

Rather than use Bitcoin core to get my keys from a wallet I tried this script posted by @sopaXT in thread https://bitcointalk.org/index.php?topic=2619534.msg26661685#msg26661685

What I got back was a list of bitcoin addresses followed by their private keys.

Noob question, in Electrum when it asks for keys do I provide both the private and public key?

In Electrum I am at the import screen that says:
"Enter a list of Bitcoin addresses (this will create a watching only wallet) or a list of private keys"

I just want to get my balance from all these addresses.

thx


Title: Re: Faster way to recover bitcoin core wallet re: verifying blockchain
Post by: idelcoins on December 29, 2017, 01:03:42 AM
Found that it won't import private keys so I guess I need private key to WIF converter.


Title: Re: Faster way to recover bitcoin core wallet re: verifying blockchain
Post by: ranochigo on December 29, 2017, 05:54:01 AM
Rather than use Bitcoin core to get my keys from a wallet I tried this script posted by @sopaXT in thread https://bitcointalk.org/index.php?topic=2619534.msg26661685#msg26661685

What I got back was a list of bitcoin addresses followed by their private keys.

Noob question, in Electrum when it asks for keys do I provide both the private and public key?

In Electrum I am at the import screen that says:
"Enter a list of Bitcoin addresses (this will create a watching only wallet) or a list of private keys"

I just want to get my balance from all these addresses.

thx
You don't have to synchronize your client to get your private keys out. Bitcoin Core does export them in WIF so that would be a lot more straightforward.

No, you don't have to. The public key can be calculated from your private key.