Bitcoin Forum
September 26, 2018, 12:06:48 AM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Help in exporting privkeys from multiple bitcoin core wallet.dats and importing  (Read 50 times)
666uazan
Jr. Member
*
Offline Offline

Activity: 194
Merit: 1


View Profile
February 12, 2018, 07:48:21 PM
 #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!
1537920408
Hero Member
*
Offline Offline

Posts: 1537920408

View Profile Personal Message (Offline)

Ignore
1537920408
Reply with quote  #2

1537920408
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537920408
Hero Member
*
Offline Offline

Posts: 1537920408

View Profile Personal Message (Offline)

Ignore
1537920408
Reply with quote  #2

1537920408
Report to moderator
1537920408
Hero Member
*
Offline Offline

Posts: 1537920408

View Profile Personal Message (Offline)

Ignore
1537920408
Reply with quote  #2

1537920408
Report to moderator
1537920408
Hero Member
*
Offline Offline

Posts: 1537920408

View Profile Personal Message (Offline)

Ignore
1537920408
Reply with quote  #2

1537920408
Report to moderator
LoyceV
Legendary
*
Offline Offline

Activity: 1246
Merit: 1996


Let's make Bitcointalk great again!


View Profile WWW
February 12, 2018, 08:49:24 PM
 #2

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

666uazan
Jr. Member
*
Offline Offline

Activity: 194
Merit: 1


View Profile
February 12, 2018, 09:22:45 PM
 #3

I did that with 3 wallets for testing purpose.
But it shows in the GUI only the first wallet... what now?
bob123
Hero Member
*****
Offline Offline

Activity: 686
Merit: 568



View Profile WWW
February 12, 2018, 09:36:45 PM
 #4

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

BitMaxz
Legendary
*
Online Online

Activity: 1190
Merit: 1032

Bitmain miners is getting worst.


View Profile WWW
February 12, 2018, 11:52:38 PM
 #5

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..

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!