Bitcoin Forum
November 13, 2019, 10:13:04 PM *
News: 10th anniversary art contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Import a wallet to bitcoin-qt  (Read 87 times)
ingvar_e
Newbie
*
Offline Offline

Activity: 22
Merit: 2


View Profile
November 04, 2019, 06:17:24 PM
 #1

I have had an bitcoin-qt installation when I was on Canaria. I have the wallet on a server. I have another bitcoin-qt installed in Stockholm. I have the wallet from Canaria on my server. Can I import the "Canaria wallet" into my Stockholm Bitcoin installation? If so, how is it done?
1573683184
Hero Member
*
Offline Offline

Posts: 1573683184

View Profile Personal Message (Offline)

Ignore
1573683184
Reply with quote  #2

1573683184
Report to moderator
The Bitcoin Forum is turning 10 years old! Join the community in sharing and exploring the notable posts made over the years.
1573683184
Hero Member
*
Offline Offline

Posts: 1573683184

View Profile Personal Message (Offline)

Ignore
1573683184
Reply with quote  #2

1573683184
Report to moderator
1573683184
Hero Member
*
Offline Offline

Posts: 1573683184

View Profile Personal Message (Offline)

Ignore
1573683184
Reply with quote  #2

1573683184
Report to moderator
BitCryptex
Hero Member
*****
Online Online

Activity: 756
Merit: 1074


Write @BitCryptex or quote my post to notify me


View Profile WWW
November 04, 2019, 06:20:53 PM
Last edit: November 04, 2019, 06:35:20 PM by BitCryptex
 #2

Can I import the "Canaria wallet" into my Stockholm Bitcoin installation? If so, how is it done?

Yes, copy the wallet file to the other server. If you are running a Linux server then your wallet file should be located in ~/.bitcoin/ by default. You might need to run bitcoin-qt with -rescan parameter after pasting the wallet file but it shouldn't be necessary in your case.

HCP
Legendary
*
Offline Offline

Activity: 1148
Merit: 1848

<insert witty quote here>


View Profile
November 04, 2019, 06:36:30 PM
 #3

Do you simply want to use the "Canaria" wallet on the Stockholm install? or are you wanting to merge the wallets?

If you want to simply use the canaria wallet, and don't care about the Stockholm one... you can shutdown the Stockholm install, put the Canaria wallet.dat into the Stockholm data directory and then restart the Stockholm bitcoind... it will then use the new wallet.dat

If you're wanting to "merge" the data from Canaria with the data from Stockholm, things get a bit trickier. You can't have two seeds in one wallet... so if Canaria is an HD wallet, you can't take the seed and put it in the Stockholm wallet. At best, you could take all the currently generated private keys, export them... then import them into Stockholm wallet.

However that has some obvious downsides... for instance, if you then generate new private keys in Canaria wallet (by exhausting the 1000 address keypool), they will not be included in Stockholm wallet... you'd need to keep exporting new private keys from Canaria and importing to Stockholm. That can get very messy and easy to get wrong. Not to mention the security implications of moving unencrypted private keys around! Shocked

Bitcoin Core also supports using Multiple Wallets on a single install. The GUI has the "File -> Open Wallet" option... and/or you can specify wallets on the commandline using the "loadwallet" command with bitcoin-cli or "-wallet" commandline argument when starting bitcoind.

ingvar_e
Newbie
*
Offline Offline

Activity: 22
Merit: 2


View Profile
November 04, 2019, 06:58:17 PM
 #4

Thank for the information. To be more specific. I just want to do a one time shot. I only want do a one way "import" of the Canaria "import" and then forget about the Canaria wallet. It was really a mistake to have separate wallets. So it is one shot.
HCP
Legendary
*
Offline Offline

Activity: 1148
Merit: 1848

<insert witty quote here>


View Profile
November 04, 2019, 07:01:06 PM
 #5

Right, so you no longer wish to use the Stockholm wallet then?

In that case, make a backup of your Stockholm wallet (just save the wallet.dat file somewhere)... you never know when you may need that again. Then shutdown the Stockholm instance of Bitcoin Core. Copy/Paste the Canaria wallet.dat into the Stockholm data directory, overwriting the current wallet.dat... then restart Stockholm Bitcoin Core.

Both your Canaria and Stockholm servers will be using the same wallet.dat (will have same addresses/private keys and transaction history/balance etc)

ingvar_e
Newbie
*
Offline Offline

Activity: 22
Merit: 2


View Profile
November 04, 2019, 07:54:14 PM
 #6

What I really want to do is to "import" the Canaria wallet into the Stockholm wallet and forget about the Canaria wallet
nc50lc
Hero Member
*****
Offline Offline

Activity: 770
Merit: 701


Self-proclaimed Genius ㊙️


View Profile WWW
November 05, 2019, 03:10:02 AM
Merited by LFC_Bitcoin (1), BitCryptex (1), Coolcryptovator (1)
 #7

    What I really want to do is to "import" the Canaria wallet into the Stockholm wallet and forget about the Canaria wallet
    So you mean, put all the addresses of "Canaria" to "Stockholm" wallet?

    To get the keys, you can use either use dumpwallet "filename" or dumpprivkey "address" (example/syntax) depending on the number of addresses you want to keep.

    To "import", you have a choice to just import the funds or import the addresses.
    • To import the funds (discard the addresses), you can just send all the funds to your Stockholm wallet (you don't even need to export anything but it involves a transaction).
    • If you prefer to keep all of the addresses, use importwallet "filename" (example/syntax).
    • If you prefer to keep some of the addresses, just use importprivkey "private_key";
      refer to the documentation (menu on the right side in the link above) for the syntax, but I suggest to add "false" except for the last prv key.
    .
    T;N: You won't be able to restore these imported addresses using the master private key (if you've exported it) or any old wallet.dat backups;
    so make sure to make another backup after doing these steps.

    ingvar_e
    Newbie
    *
    Offline Offline

    Activity: 22
    Merit: 2


    View Profile
    November 05, 2019, 09:59:15 AM
    Last edit: November 05, 2019, 11:03:07 AM by ingvar_e
     #8

    Excellent info, thanks. Questions:

     - importwallet "filename"  I assume that "filename" is the actual wallet   xxxx.dat or is it a dumpfile
     - Where do I specify the actual command?

    Found how to specify the commands



    nc50lc
    Hero Member
    *****
    Offline Offline

    Activity: 770
    Merit: 701


    Self-proclaimed Genius ㊙️


    View Profile WWW
    November 05, 2019, 01:41:27 PM
     #9

    Quote from: ingvar_e
    - Where do I specify the actual command?
    In the console tab (Help->Debug Window).

    - importwallet "filename"  I assume that "filename" is the actual wallet   xxxx.dat
    That's the "filename" that you specified in "dumpwallet" command.
    The directory/path can be indicated as well depending on the location (read the documentation from the link above).

    BTW, you need to unlock your wallet using walletpassphrase YOUR_PASSPHRASE 300 before proceeding (300 is the unlock duration in seconds).
    Also, backup your current wallet.dat(s) before proceeding.

    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!