Author

Topic: Help in exporting privkeys from multiple bitcoin core wallet.dats and importing (Read 118 times)

legendary
Activity: 3290
Merit: 3011
BTC price road to $80k
I did that with 3 wallets for testing purpose.
But it shows in the GUI only the first wallet... what now?

Here you can try this command this time you can export all private keys

Code:
dumpwallet "filename"

sample dumpwallet myprivatekeys
and hit enter
The you can see where it save and you can open it in text file

or you can export it only selected address
Code:
dumpprivkey 1YouRBitcoinaddress

Do this if you wanted only selected addresses to be exported.. 
For importing you can use this command

Code:
importprivkey [Anylabelyouwant] [rescan=false]

or import wallet from dump wallet you can use this command
Code:
importwallet filename

Hope this works..
legendary
Activity: 1624
Merit: 2481
I have several wallet.dat files from bitcoin core.
I want to export all the privkeys of all those wallets.
Then import them all into 1 single wallet.dat.

You can use pywallet[1] to dump your private keys without opening the wallet in core.
The command would be the following:
Code:
./pywallet --dumpwallet --walletfile=YOUR_WALLET_FILE

You would have to run this command for every wallet seperately.
But if you have quite a lot of wallet files, you could write a simple script (3 liner) to do this automatically for each wallet.

[1] https://github.com/jackjack-jj/pywallet
jr. member
Activity: 185
Merit: 1
I did that with 3 wallets for testing purpose.
But it shows in the GUI only the first wallet... what now?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I want to do this without opening the wallet.dat with bitcoin core. Because it takes a lot of time to rescan.
As a work around: you can load them all at once in Bitcoin Core (thanks to multi wallet support). I just tested it with 2 wallets, after that it shows all addresses in the GUI.
It still needs to rescan them all, but you can make it a one-time thing to start, then let it run overnight (or longer?).
If you want to give it a try, start Bitcoin Core with command line options:
Code:
--wallet=wallet1.dat --wallet=wallet2.dat --wallet=wallet3.dat
jr. member
Activity: 185
Merit: 1
Basically this is my problem:

I have several wallet.dat files from bitcoin core.
I want to export all the privkeys of all those wallets.
Then import them all into 1 single wallet.dat.
I want to do this without opening the wallet.dat with bitcoin core. Because it takes a lot of time to rescan.
Thank you!
Jump to: