<p>You need to put the old wallet.dat in your bitcoin data directory.</p>

<p><strong>The default for Windows is:</strong></p>

<pre><code>C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)

C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)
</code></pre>

<p>Then run the bitcoin client with the <code>-rescan</code> option.</p>

<p>Alternatively you can run the bitcoin client with the <code>-datadir=&lt;location of backup wallet.dat&gt;</code> as well as the <code>-rescan</code> option if you do not want to move/backup the new wallet.dat.<br /><br /></p>

<p><strong>The default for Mac OS X is:</strong></p>

<pre><code>~/Library/Application\Support\Bitcoin
</code></pre>

<p><br />
<strong>The default for Linux is:</strong></p>

<pre><code>~/.bitcoin
</code></pre>

CC BY-SA 3.0
2014-06-20T03:02:04.970Z
That requires that you wipe out the other wallet. How can you merge the two?
Andrew Arnott
CC BY-SA 3.0
2011-09-02T18:34:07.563Z
It worked on Ubuntu too, but the wallet file was located at `~/.bitcoin`
Jader Dias
CC BY-SA 3.0
2011-09-03T00:47:52.133Z
And on OS X in ~/Library/Application\ Support/Bitcoin/
Joshua Kolden
CC BY-SA 3.0
2012-03-26T13:13:23.910Z
Note that since 0.3.21 it is not necessary anymore to specify -rescan when moving a wallet file to a new installation.
Pieter Wuille
CC BY-SA 3.0
2011-09-01T02:12:26.207Z
2014-04-04T07:52:22.757Z
2014-04-04T07:52:22.757Z
tysat
<p>I just purchased a new laptop and I want to decommission my old one.  I have a back-up of my wallet.dat file copied to my new PC.  What do I need to do to restore it to my Bitcoin (Windows) client?  Please note, this is a wallet.dat file that is about 6 months old and I haven't loaded it in at least four months.  I'm not sure if that makes a difference or not, contingent on the original version of the client that created the file.</p>

<bitcoin-core><wallet><security><wallet-recovery><backup>
How can I restore my wallet?
RLH
# How can I restore my wallet?

(Asked by: username_0 on 2011-09-01)

I just purchased a new laptop and I want to decommission my old one. I have a back-up of my wallet.dat file copied to my new PC. What do I need to do to restore it to my Bitcoin (Windows) client? Please note, this is a wallet.dat file that is about 6 months old and I haven't loaded it in at least four months. I'm not sure if that makes a difference or not, contingent on the original version of the client that created the file.

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


---

## 1 answers

### Answer by username_1 on 2011-09-01. Score: 30 | Accepted answer

You need to put the old wallet.dat in your bitcoin data directory.
The default for Windows is:
C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)

C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)

Then run the bitcoin client with the -rescan option.
Alternatively you can run the bitcoin client with the -datadir= as well as the -rescan option if you do not want to move/backup the new wallet.dat.
The default for Mac OS X is:
~/Library/Application\Support\Bitcoin


The default for Linux is:
~/.bitcoin

> **Comments:**
> **username_3**: It worked on Ubuntu too, but the wallet file was located at `~/.bitcoin`  
> **username_4**: And on OS X in ~/Library/Application\ Support/Bitcoin/  
> **username_5**: Note that since 0.3.21 it is not necessary anymore to specify -rescan when moving a wallet file to a new installation.  
> **username_2**: That requires that you wipe out the other wallet. How can you merge the two?  

---

