<p>I recently recovered an old wallet.dat file using pywalley.py and Electrum, which allowed me to read the wallet and sweep the coins to a new Electrum wallet.</p>
<p>Steps:</p>
<ul>
<li>Get the jackjack pywallet <a href="https://github.com/jackjack-jj/pywallet" rel="nofollow noreferrer">https://github.com/jackjack-jj/pywallet</a></li>
<li>Put the wallet.dat in that directory</li>
<li><code>./pywallet.py --dumpwallet  --datadir=. --passphrase=PASSPHRASE</code></li>
</ul>
<p>Passphrase is optional, only if the wallet is encrypted.</p>
<p>If that works, then run it again with the --dumpwithbalance option, that is</p>
<p><code>./pywallet.py --dumpwallet --dumpwithbalance --datadir=. --passphrase=PASSPHRASE</code></p>
<p>Ideally, redirect it to a file. Then, search the file for nonzero balances.</p>
<p>You can use <a href="http://BitRef.com" rel="nofollow noreferrer">http://BitRef.com</a> to make sure that the addresses with balances still have balances.</p>
<p>In the JSON dump of the wallet.dat file, you will find the private key, in the field labeled &quot;sec.&quot; Don't share that with with anyone. That key will allow anyone to sweep your bitcoins into their wallet.</p>
<p>Using that key, you can install the Electrum wallet and sweep the coins into a new wallet without downloading the blockchain. You will pay a fee of 0.2-0.5 mBTC to do it slowly, more if you are in a hurry.</p>
<p>There are good instructions at <a href="https://en.bitcoin.it/wiki/Transferring_coins_from_Bitcoin-Qt_to_Electrum" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Transferring_coins_from_Bitcoin-Qt_to_Electrum</a> which include a link to a more paranoid process using an offline computer to avoid accidental exposure of your private key.</p>
<p>There is a default fee of 0.5 mBTC, you can adjust it in Tools--&gt;Preferences.</p>
<p>The address in the &quot;Sweep&quot; dialog box is just the new wallet address being swept to.</p>
<p>You can watch the transaction progress at <a href="http://bitref.com" rel="nofollow noreferrer">http://bitref.com</a> or <a href="http://blockchain.info" rel="nofollow noreferrer">http://blockchain.info</a>.</p>
<p>Once in the new wallet, you can send to an exchange like CoinBase to cash out, or just spend the Bitcoin. The Electrum wallet costs more in fees but saves you the pain of downloading and managing the whole blockchain.</p>
<p>EDIT #1: The sad news is that as of January 2018 the transaction fees are hovering around USD $40, so recovering a small wallet will probably consume all of its value. I managed to sign a low fee transaction from my old wallet, but it has been stuck in the mempool for weeks, now. It may be there forever.</p>
<p>EDIT #2: After 26 days in the mempool, my low fee bitcoin transaction finally got confirmed.</p>

CC BY-SA 3.0
2018-03-01T06:51:04.813Z
[This is also useful](https://github.com/OmniLayer/omniwallet/wiki/Exporting-Private-Key-from-Blockchain.info-and-Importing-to-Omniwallet.org)
Pikachu
CC BY-SA 4.0
2024-03-02T14:10:07.950Z
what I don't understand is that if you can do it this way with Electrum, why cant you do it this way (or a similar way) using Bitcoin Core app?  There doesn't seem to be a plain explanation of how to do it in the Core app.
Jon Grah
CC BY-SA 4.0
2024-03-12T16:19:46.437Z
It should be even simpler - just use the send and receive functions. Get the address of your desired Bitcoin core wallet, and send from your stored wallet address to the new address. Since Bitcoin Core has the whole blockchain, you just need the address and password of the offline wallet. (Disclaimer: I have never used Bitcoin Core, just looking at instructions)
Phillip Remaker
CC BY-SA 4.0
2017-12-27T22:34:26.230Z
2021-03-17T21:08:58.157Z
2021-03-17T21:08:58.157Z
Phillip Remaker
<p>which OS are you running? In a first step, you don't need to wait for the app to sync completly. The address is relevant. Can you see "your address"? If so, cut&amp;paste it into blockchain.info, and see what values are there. You may have several addresses... In the bitcoin-cli or the command line window you can try "getaccount" or "getaccountaddress". (a complete list of commands here: <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list</a>). 
When you see some values, all then it might be worthwhile to wait for the sync. At the point in time, when you mentioned your wallet had it's last transaction (apr 2013), "getblockcount" should return a number below the 300.000 range. (Today we are at block ~485.000, and all 10 minutes a block is created. This is 6 per hour, 144 per day, ~50.000 per year). 
So once you have reached sync with this block height, you should see your values. I think the client even says, how far it is behind, when hovering with the mouse in the lower right corner. </p>

<p>When you see your values, you are able to spend it, even if client is not fully sync'ed. </p>

CC BY-SA 3.0
2017-09-18T20:57:20.270Z
2017-09-18T20:57:20.270Z
pebwindkraft
<p>If you're unsure whether your wallet desktop software is showing the right amount, a good check may be to put your public address into the search box at <a href="https://blockchain.info/" rel="nofollow noreferrer">https://blockchain.info/</a> (i.e. not the text box in the top left; scroll down and see the search box).</p>

<p>This site will show you all the transactions into and out of that public address. I guess the first step is getting your local Bitcoin database to mirror that.</p>

<p>If you had $8 in 2013, I suspect you have rather more than $100 now. Once you find the money, I would, if I were you, move it to a fresh public address (taking care to keep the private key for it safe!) given that the private key to your existing account has been in the cloud. </p>

CC BY-SA 3.0
2017-12-17T21:37:17.493Z
2017-12-17T21:37:17.493Z
Phil Whittington
<p>I had about $8 USD worth of bitcoin in a wallet, and I backed up the wallet.dat to my dropbox. According to the modified date of the file this was in April 2013, so it was probaby from bitcoin qt version 0.8.1, or maybe a little earlier.</p>

<p>I basically left it there and haven't done anything with bitcoin since then. Since it is worth probably at least $100 now I decided to check the exact amount.</p>

<p>I downloaded the latest version of bitcoin core, added the wallet.dat file to the data directory, started it with -rescan, and waited almost a month (!) for the blockchain data to get up to date. The balance showed as 0 the whole time. I thought it would update once the blockchain was totally downloaded, but it still just says 0.</p>

<p>Is this a problem with old vs new versions? Did I do something wrong? Next time, should I expect the balance to show a non-zero amount even if I haven't downloaded the whole blockchain yet?</p>

CC BY-SA 3.0
2017-09-18T19:06:34.750Z
Do you see incoming/outgoing transactions to/from your addresses in "transactions" tab?
amaclin
<bitcoin-core><wallet.dat><wallet-recovery>
opening an old wallet.dat
valan
# opening an old wallet.dat

(Asked by: username_0 on 2017-09-18)

I had about $8 USD worth of bitcoin in a wallet, and I backed up the wallet.dat to my dropbox. According to the modified date of the file this was in April 2013, so it was probaby from bitcoin qt version 0.8.1, or maybe a little earlier.

I basically left it there and haven't done anything with bitcoin since then. Since it is worth probably at least $100 now I decided to check the exact amount.

I downloaded the latest version of bitcoin core, added the wallet.dat file to the data directory, started it with -rescan, and waited almost a month (!) for the blockchain data to get up to date. The balance showed as 0 the whole time. I thought it would update once the blockchain was totally downloaded, but it still just says 0.

Is this a problem with old vs new versions? Did I do something wrong? Next time, should I expect the balance to show a non-zero amount even if I haven't downloaded the whole blockchain yet?

**Tags:** bitcoin-core, wallet.dat, wallet-recovery

> **Comments:**
> **username_1**: Do you see incoming/outgoing transactions to/from your addresses in "transactions" tab?  

---

## 3 answers

### Answer by username_2 on 2017-12-27. Score: 16

I recently recovered an old wallet.dat file using pywalley.py and Electrum, which allowed me to read the wallet and sweep the coins to a new Electrum wallet.

Steps:

* Get the jackjack pywallet <https://github.com/jackjack-jj/pywallet>
* Put the wallet.dat in that directory
* `./pywallet.py --dumpwallet --datadir=. --passphrase=PASSPHRASE`

Passphrase is optional, only if the wallet is encrypted.

If that works, then run it again with the --dumpwithbalance option, that is

`./pywallet.py --dumpwallet --dumpwithbalance --datadir=. --passphrase=PASSPHRASE`

Ideally, redirect it to a file. Then, search the file for nonzero balances.

You can use <http://BitRef.com> to make sure that the addresses with balances still have balances.

In the JSON dump of the wallet.dat file, you will find the private key, in the field labeled "sec." Don't share that with with anyone. That key will allow anyone to sweep your bitcoins into their wallet.

Using that key, you can install the Electrum wallet and sweep the coins into a new wallet without downloading the blockchain. You will pay a fee of 0.2-0.5 mBTC to do it slowly, more if you are in a hurry.

There are good instructions at <https://en.bitcoin.it/wiki/Transferring_coins_from_Bitcoin-Qt_to_Electrum> which include a link to a more paranoid process using an offline computer to avoid accidental exposure of your private key.

There is a default fee of 0.5 mBTC, you can adjust it in Tools-->Preferences.

The address in the "Sweep" dialog box is just the new wallet address being swept to.

You can watch the transaction progress at <http://bitref.com> or <http://blockchain.info>.

Once in the new wallet, you can send to an exchange like CoinBase to cash out, or just spend the Bitcoin. The Electrum wallet costs more in fees but saves you the pain of downloading and managing the whole blockchain.

EDIT #1: The sad news is that as of January 2018 the transaction fees are hovering around USD $40, so recovering a small wallet will probably consume all of its value. I managed to sign a low fee transaction from my old wallet, but it has been stuck in the mempool for weeks, now. It may be there forever.

EDIT #2: After 26 days in the mempool, my low fee bitcoin transaction finally got confirmed.

> **Comments:**
> **username_3**: [This is also useful](https://github.com/OmniLayer/omniwallet/wiki/Exporting-Private-Key-from-Blockchain.info-and-Importing-to-Omniwallet.org)  
> **username_4**: what I don't understand is that if you can do it this way with Electrum, why cant you do it this way (or a similar way) using Bitcoin Core app?  There doesn't seem to be a plain explanation of how to do it in the Core app.  
> **username_2**: It should be even simpler - just use the send and receive functions. Get the address of your desired Bitcoin core wallet, and send from your stored wallet address to the new address. Since Bitcoin Core has the whole blockchain, you just need the address and password of the offline wallet. (Disclaimer: I have never used Bitcoin Core, just looking at instructions)  

---

### Answer by username_5 on 2017-09-18. Score: 1

which OS are you running? In a first step, you don't need to wait for the app to sync completly. The address is relevant. Can you see "your address"? If so, cut&paste it into blockchain.info, and see what values are there. You may have several addresses... In the bitcoin-cli or the command line window you can try "getaccount" or "getaccountaddress". (a complete list of commands here: <https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list>).
When you see some values, all then it might be worthwhile to wait for the sync. At the point in time, when you mentioned your wallet had it's last transaction (apr 2013), "getblockcount" should return a number below the 300.000 range. (Today we are at block ~485.000, and all 10 minutes a block is created. This is 6 per hour, 144 per day, ~50.000 per year).
So once you have reached sync with this block height, you should see your values. I think the client even says, how far it is behind, when hovering with the mouse in the lower right corner.

When you see your values, you are able to spend it, even if client is not fully sync'ed.


---

### Answer by username_6 on 2017-12-17. Score: 0

If you're unsure whether your wallet desktop software is showing the right amount, a good check may be to put your public address into the search box at <https://blockchain.info/> (i.e. not the text box in the top left; scroll down and see the search box).

This site will show you all the transactions into and out of that public address. I guess the first step is getting your local Bitcoin database to mirror that.

If you had $8 in 2013, I suspect you have rather more than $100 now. Once you find the money, I would, if I were you, move it to a fresh public address (taking care to keep the private key for it safe!) given that the private key to your existing account has been in the cloud.


---

