Import wallet.dat into a new Bitcoin-Qt client

Import wallet.dat into a new Bitcoin-Qt client

I had Bitcoin-Qt on my computer with several bitcoins in my wallet, using Vista. Then my computer crashed.  Finally I was able to get my computer fixed and download a new version of Bitcoin-Qt.  Now I would like to import my original wallet.dat from the old client which was encrypted into an new version of Bitcoin-Qt.  How do I do that?  

Solutions/Answers:

Answer 1:

First, close the Bitcoin-Qt client.

Then you have to locate your Bitcoin folder. For Windows, it should be here:

%APPDATA%\Bitcoin

In that folder, there should be a wallet.dat file.

  • If you currently have no bitcoins in your wallet, you can just delete that file and replace it with your backup.
  • If you have some bitcoins in this wallet as well, backup that wallet file as well, or send all the coins to an address from your backed up wallet.

When you placed the other wallet.dat file in place, you should run Bitcoin-Qt with the -rescan option. Here’s how to do that in Windows:

  • Go to C:\Program Files (x86)\Bitcoin using Windows Explorer.

  • In that folder, hold shift and right-click and select Open command window here (picture).

  • In the command prompt, type bitcoin-qt.exe -rescan and hit enter (picture).

Now Bitcoin-Qt should start and rescan the blockchain to calculate the balances of the addresses in your wallet.dat file.

(Source for pictures: cant see bitcoin after restore of backup)

Answer 2:

For OSX:

  1. Backup your original wallet.dat file (~/Library/Application Support/Bitcoin/wallet.dat by default). This contains the private keys for your bitcoins. If you lose it, you lose your coins.
  2. Install Bitcoin Core on a machine with 100s of gigabytes of free space. Allow it to download the blockchain. This could take days.
  3. Replace the wallet.dat file on the new machine with your old one.
  4. Start Bitcoin Core on the new machine with the rescan flag, to scan the blockchain for your newly imported bitcoin. You can do this with the command line /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -rescan. This can also take a long time (hours).
  5. Your wallet should now be imported and working on the new computer.

Answer 3:

the other answers suggest closing your node copying directories etc, NOT necessary. Here is how i did it starting with an old wallet2.dat file:

  1. create a folder foo (any name, any directory)
  2. copy the file wallet2.dat into folder foo and rename the wallet to wallet.dat
  3. on the GUI click Window->Console and type into the > field: help loadwallet which will tell you bunch of stuff (you can read it, or skip to next point)
  4. type loadwallet /path/to/your/folder/foo (change it to your actual path where folder foo is, on windows eg C:\Users\user\Downloads\foo)
  5. wait, just wait (for me 30min), when done you will see sth like:

    {
    “name”: “/home/user/Downloads/foo/”,
    “warning”: “”
    }

  6. got to File->Open Wallet -> foo (your name should be listed here)

  7. On the right side there is now a dropdown menu where you can selected your open wallets (if it does not appear you had no other wallet open, also ok)

enter image description here

(Since the wallet is now located in the folder foo and outside the datadir, you might want to close your node and copy the folder into the wallets directory in your datadir; I just wanted to recover the wallet, clean it and send the funds to the default wallet deleting foo anyway)

Answer 4:

I think the above answer is good, but I have typically restored a few times with

1. ShutDown BitCoin Client
2. Find your wallet location  (%APPDATA%\Bitcoin)   OR for example :  C:\Users\UserName\AppData\Roaming\Bitcoin
3. Backup, verify, then delete that wallet.dat file 
4. Paste your other wallet.dat file into the folder.
5. Open BitCoin Client  , blocks get checked and updated, and you should see your amount.
6. I'm not sure that you need to do command prompt with the -rescan...   I didn't have to..

Our Awesome Tools

References

Loading...