<p>A wallet.dat file contains no information specific to a particular install of Bitcoin Core, or its configured data and wallet directories.</p>

<p>You can freely copy just the wallet file to another instance, without having to copy the block data or other information such as peers, mempool, etc.</p>

CC BY-SA 4.0
2020-02-14T05:27:27.910Z
I did it @Raghav, but the balance information was 0 in the server 2 whereas it was not 0 in the server 1. I thought I might did something wrong. What's your idea?
Mohammad Saberi
CC BY-SA 4.0
2020-02-14T05:30:42.243Z
Is your new server fully synced?
Raghav Sood
CC BY-SA 4.0
2020-02-14T05:33:19.793Z
If you mean syncing with blockchain, no it was not sync fully when I tested the wallet.
Mohammad Saberi
CC BY-SA 4.0
2020-02-14T06:04:02.647Z
A node always effectively treats the state of the ledger as it was at the point it's synchronized to. If you load a new wallet in a not-yet-synced node, the balance shown will be the one you had at that point in time.
Pieter Wuille
CC BY-SA 4.0
2020-02-14T03:34:04.763Z
2020-02-14T03:34:04.763Z
Raghav Sood
<p>I have a Bitcoin core server (Server 1) which is working well. Now I am testing backing up and restoring its wallet on a new server (Server 2).
Imagine that the server 1 has these configs:  </p>

<pre><code>blocksdir=/btc/blocks
datadir=/btc/data # wallet.dat file is here in  the wallets directory
</code></pre>

<p>Now, I want to move the backup file (wallet.dat) to the new server which its default paths are like this:  </p>

<pre><code>~/.bitcoin/wallet.dat
~/.bitcoin/blocks
</code></pre>

<ol>
<li>Do I need to have the same paths in the server 2 for <strong>data</strong> and <strong>block</strong> directory as the server 1? Or can I move the backup file to the default path of wallet.dat in server 2?</li>
<li>Should I copy the download blockchain from the server 1 and move them to server 2 too?</li>
</ol>

<bitcoin-core><wallet-recovery><wallet.dat><backup>
Does restoring wallet.dat require the same paths and configs in servers?
Mohammad Saberi
# Does restoring wallet.dat require the same paths and configs in servers?

(Asked by: username_0 on 2020-02-13)

I have a Bitcoin core server (Server 1) which is working well. Now I am testing backing up and restoring its wallet on a new server (Server 2).
Imagine that the server 1 has these configs:

```
blocksdir=/btc/blocks
datadir=/btc/data # wallet.dat file is here in  the wallets directory

```

Now, I want to move the backup file (wallet.dat) to the new server which its default paths are like this:

```
~/.bitcoin/wallet.dat
~/.bitcoin/blocks

```

1. Do I need to have the same paths in the server 2 for **data** and **block** directory as the server 1? Or can I move the backup file to the default path of wallet.dat in server 2?
2. Should I copy the download blockchain from the server 1 and move them to server 2 too?

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


---

## 1 answers

### Answer by username_1 on 2020-02-14. Score: 1 | Accepted answer

A wallet.dat file contains no information specific to a particular install of Bitcoin Core, or its configured data and wallet directories.

You can freely copy just the wallet file to another instance, without having to copy the block data or other information such as peers, mempool, etc.

> **Comments:**
> **username_0**: I did it @username_1, but the balance information was 0 in the server 2 whereas it was not 0 in the server 1. I thought I might did something wrong. What's your idea?  
> **username_1**: Is your new server fully synced?  
> **username_0**: If you mean syncing with blockchain, no it was not sync fully when I tested the wallet.  
> **username_2**: A node always effectively treats the state of the ledger as it was at the point it's synchronized to. If you load a new wallet in a not-yet-synced node, the balance shown will be the one you had at that point in time.  

---

