0

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?
1

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.

  • 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 Feb 14 at 5:27
  • Is your new server fully synced? – Raghav Sood Feb 14 at 5:30
  • If you mean syncing with blockchain, no it was not sync fully when I tested the wallet. – Mohammad Saberi Feb 14 at 5:33
  • 3
    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 Feb 14 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.