<ul>
<li>Install Python 2.7 and download pywallet to your <code>c:\</code> drive. </li>
<li>Copy your corrupt wallet.dat file to <code>c:\</code> </li>
<li><p>Open a Command Prompt and type:</p>

<pre><code>C:\&gt;pywallet.py --dumpwallet --datadir c:\  --wallet=wallet.dat --recover --recov_device=c:\wallet.dat --recov_size=416Gio --recov_outputdir=c:\
</code></pre>

<p>It should extract all the keys to a new wallet on <code>c:\</code> 
Copy the new wallet.dat to the <code>c:\users\USERNAME\Appdata\Roaming\Bitcoin</code> folder </p></li>
<li><p>rename it wallet.dat. </p></li>
<li><p>Start up Bitcoin-QT with the <code>--rescan</code> switch. 
It should take a while, but eventually it will start up and your coins are back.</p></li>
</ul>

CC BY-SA 3.0
2014-01-27T01:28:28.133Z
2014-01-28T10:38:39.263Z
2014-01-28T10:38:39.263Z
silicon_chip
<p>Checkout pywallet. Its a python script that may be able to help you out by recovering your private key. I've had similar issues with Multibit in the past. Is your wallet encrypted?</p>

<p><a href="https://github.com/jackjack-jj/pywallet" rel="nofollow">https://github.com/jackjack-jj/pywallet</a></p>

CC BY-SA 3.0
2013-12-07T10:58:04.460Z
2013-12-07T10:58:04.460Z
mosca1337
<p>In short, </p>

<ul>
<li>I bought a few BTC years ago when they were very cheap.</li>
<li>I reformatted my HDD and reinstalled the OS.</li>
<li>I have used PhotoRec and
<a href="http://www.cyplo.net/2012/04/01/bitcoin-wallet-recovery-photorec/" rel="nofollow">http://www.cyplo.net/2012/04/01/bitcoin-wallet-recovery-photorec/</a> to
recover 3 .dat files. Searching only for the ''detection signature''
of a Bitcoin wallet.dat</li>
</ul>

<p>And the confusing part (if reformatting a hard drive containing bitcoins was not confusing enough!) is that the recovered .dat files are 7GB , 13GB and 8 kb.</p>

<p>Obviously, trying to use the recovered wallet.dat with Bitcoin-qt failed. </p>

<p>Chances are that these .dat are not wallets but I though this would be worth a shot considering how massively more valuable BTC are compared to 3 years ago. </p>

<p>Anything I can do with these recovered files?</p>

<p>Thank you!</p>

CC BY-SA 3.0
2013-11-29T20:18:36.833Z
Re: filesize, I've heard it's not uncommon for PhotoRec to recover a file but for it's file size to be much more inflated than the original.
user1202278
<wallet><bitcoin-core><wallet-recovery>
Salvaged possible wallet from corrupt HDD ... now what?
user1202278
# Salvaged possible wallet from corrupt HDD ... now what?

(Asked by: username_0 on 2013-11-29)

In short,

* I bought a few BTC years ago when they were very cheap.
* I reformatted my HDD and reinstalled the OS.
* I have used PhotoRec and
  <http://www.cyplo.net/2012/04/01/bitcoin-wallet-recovery-photorec/> to
  recover 3 .dat files. Searching only for the ''detection signature''
  of a Bitcoin wallet.dat

And the confusing part (if reformatting a hard drive containing bitcoins was not confusing enough!) is that the recovered .dat files are 7GB , 13GB and 8 kb.

Obviously, trying to use the recovered wallet.dat with Bitcoin-qt failed.

Chances are that these .dat are not wallets but I though this would be worth a shot considering how massively more valuable BTC are compared to 3 years ago.

Anything I can do with these recovered files?

Thank you!

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

> **Comments:**
> **username_0**: Re: filesize, I've heard it's not uncommon for PhotoRec to recover a file but for it's file size to be much more inflated than the original.  

---

## 2 answers

### Answer by username_1 on 2014-01-27. Score: 3

* Install Python 2.7 and download pywallet to your `c:\` drive.
* Copy your corrupt wallet.dat file to `c:\`
* Open a Command Prompt and type:

  ```
  C:\>pywallet.py --dumpwallet --datadir c:\  --wallet=wallet.dat --recover --recov_device=c:\wallet.dat --recov_size=416Gio --recov_outputdir=c:\

  ```

  It should extract all the keys to a new wallet on `c:\`
  Copy the new wallet.dat to the `c:\users\USERNAME\Appdata\Roaming\Bitcoin` folder
* rename it wallet.dat.
* Start up Bitcoin-QT with the `--rescan` switch.
  It should take a while, but eventually it will start up and your coins are back.


---

### Answer by username_2 on 2013-12-07. Score: 1

Checkout pywallet. Its a python script that may be able to help you out by recovering your private key. I've had similar issues with Multibit in the past. Is your wallet encrypted?

<https://github.com/jackjack-jj/pywallet>


---

