Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: TAiS46 on March 06, 2013, 04:15:26 PM



Title: Merge two wallet.dat
Post by: TAiS46 on March 06, 2013, 04:15:26 PM
Hello,

i have two wallet.dat files and want to merge it.
It there a simple option?
The one wallet.dat file hast 200mb and the other one 70mb.

It will be good, when I can do it in a fast process.
Maybe I can stop bitcoind 2 to dump the privkeys from the wallet.dat
and import them without stopping bitcoind 1 into the other wallet?

Thx Simon


Title: Re: Merge two wallet.dat
Post by: DarkHyudrA on March 06, 2013, 04:43:13 PM
Your idea will not wok, if you sent bitcoins with bitcoin-qt.
Because when you send some bitcoins, part of your bicoins goes to hidden addresses, which you don't know who they are to use the dumpprivkey.


Title: Re: Merge two wallet.dat
Post by: Stephen Gornick on March 06, 2013, 10:08:18 PM
and import them without stopping bitcoind 1 into the other wallet?

With Bitcoin-Qt/bitcoind v0.8 you can do an importprivkey and rescan=true on the last one to import and it will rescan.  With versions prior to v0.8 it did a rescan after each import, or you could (and still can) force a rescan when launching the program.

listreceivedbyaddress will give all the addresses in which you've received funds.


Title: Re: Merge two wallet.dat
Post by: TAiS46 on March 07, 2013, 10:06:33 PM
Hm,

so maybe I will create a script that uses "dumpprivkey"
to get all keys and than a importprivkey "" 0 to import the key.

after that I will restart bitcoind with -rescan