<blockquote>
  <p>1) If I only backup that <code>extended private masterkey</code>, would I be able to recreate the wallet entirely in case my application crashes? Or do I really need to backup the wallet <em>file</em> itself? (Let's say I do <strong>not</strong> import addresses that were not generated by <code>bitcoind</code> itself.)</p>
</blockquote>

<p>No. Bitcoin Core does not allow your to create a wallet from the master private key. There is no way to import it into a newly created wallet or to create a new wallet with a master extended private key.</p>

<blockquote>
  <p>2) I heard that changing the <code>passphrase</code> of a wallet would change the <code>extended private masterkey</code>... Is that true? </p>
</blockquote>

<p>Only setting the password will change it. Subsequent password changes will not change any of the private keys in your wallet.</p>

<hr>

<p>An important thing to note here is that Bitcoin Core does not use an extended private key. Rather it uses a HD seed (as defined in BIP 32). When keys are being generated, that seed is hashed to get the extended master private key, and from there the child keys are derived. That extended master private key is never stored in the wallet file itself.</p>

<p>Instead of backing up the master private key, you could instead backup the HD seed. This can also be found in the <code>dumpwallet</code> output and it will be listed as <code>hdseed=1</code>. It will look like a normal private key and be presented in Wallet Import Format.</p>

<p>Once you have the seed, you can create a new wallet and set it to use your backed up seed using the <code>sethdseed</code> command.</p>

CC BY-SA 4.0
2019-10-20T22:07:29.703Z
If I understand, I backup this special `hdseed=1` private key, and I'll then be able to recreate the wallet from scratch, even if I set and change the `passphrase` after that? (Thanks a lot for the help!)
electrotype
CC BY-SA 4.0
2019-10-20T23:03:37.950Z
Yes. The HD seed is effectively the same thing as the extended master private key. However, other wallets probably won't be able to import it.
Ava Chow
CC BY-SA 4.0
2021-10-12T16:14:24.727Z
@AndrewChow: Do you mean the exact HD algorithms of Bitcoin Core are not standard (or can be considered a de-facto standard) and any vendor is actually free to implement HD in any way differently than what Bitcoin Core does?
Mercedes
CC BY-SA 4.0
2021-10-12T16:51:51.330Z
@Mercedes No, Bitcoin Core follows BIP 32. It is just that Bitcoin Core does not expose the same information that other wallets typically do.
Ava Chow
CC BY-SA 4.0
2019-10-20T21:55:59.300Z
2019-10-20T21:55:59.300Z
Ava Chow
<p>If I understand correctly, <code>bitcoind</code> makes use of a <code>extended private masterkey</code> in order to deterministically generate private/public keys for a wallet.</p>

<p>Using the <code>dumpwallet</code> command, I'm able to get access to this <code>extended private masterkey</code>.</p>

<p>My questions:</p>

<p>1) If I only backup that <code>extended private masterkey</code>, would I be able to recreate the wallet entirely in case my application crashes? Or do I really need to backup the wallet <em>file</em> itself? (Let's say I do <strong>not</strong> import addresses that were not generated by <code>bitcoind</code> itself.)</p>

<p>2) I heard that changing the <code>passphrase</code> of a wallet would change the <code>extended private masterkey</code>... Is that true? </p>

<p>3) If #2 is true, can I simply backup all generated <code>extended private masterkeys</code> (every time I change the <code>passphrase</code>) to be able to recreate the wallet entirely using those multiple <code>extended private masterkeys</code>? What would be the command to run to recreate the wallet from more than one <code>extended private masterkeys</code>?</p>

<bitcoind><wallet><wallet-recovery><backup>
Backup of a bitcoind wallet using the extended private masterkey only
electrotype
# Backup of a bitcoind wallet using the extended private masterkey only

(Asked by: username_0 on 2019-10-20)

If I understand correctly, `bitcoind` makes use of a `extended private masterkey` in order to deterministically generate private/public keys for a wallet.

Using the `dumpwallet` command, I'm able to get access to this `extended private masterkey`.

My questions:

1) If I only backup that `extended private masterkey`, would I be able to recreate the wallet entirely in case my application crashes? Or do I really need to backup the wallet *file* itself? (Let's say I do **not** import addresses that were not generated by `bitcoind` itself.)

2) I heard that changing the `passphrase` of a wallet would change the `extended private masterkey`... Is that true?

3) If #2 is true, can I simply backup all generated `extended private masterkeys` (every time I change the `passphrase`) to be able to recreate the wallet entirely using those multiple `extended private masterkeys`? What would be the command to run to recreate the wallet from more than one `extended private masterkeys`?

**Tags:** bitcoind, wallet, wallet-recovery, backup


---

## 1 answers

### Answer by username_1 on 2019-10-20. Score: 3 | Accepted answer

> 1) If I only backup that `extended private masterkey`, would I be able to recreate the wallet entirely in case my application crashes? Or do I really need to backup the wallet *file* itself? (Let's say I do **not** import addresses that were not generated by `bitcoind` itself.)

No. Bitcoin Core does not allow your to create a wallet from the master private key. There is no way to import it into a newly created wallet or to create a new wallet with a master extended private key.

> 2) I heard that changing the `passphrase` of a wallet would change the `extended private masterkey`... Is that true?

Only setting the password will change it. Subsequent password changes will not change any of the private keys in your wallet.

---

An important thing to note here is that Bitcoin Core does not use an extended private key. Rather it uses a HD seed (as defined in BIP 32). When keys are being generated, that seed is hashed to get the extended master private key, and from there the child keys are derived. That extended master private key is never stored in the wallet file itself.

Instead of backing up the master private key, you could instead backup the HD seed. This can also be found in the `dumpwallet` output and it will be listed as `hdseed=1`. It will look like a normal private key and be presented in Wallet Import Format.

Once you have the seed, you can create a new wallet and set it to use your backed up seed using the `sethdseed` command.

> **Comments:**
> **username_0**: If I understand, I backup this special `hdseed=1` private key, and I'll then be able to recreate the wallet from scratch, even if I set and change the `passphrase` after that? (Thanks a lot for the help!)  
> **username_1**: Yes. The HD seed is effectively the same thing as the extended master private key. However, other wallets probably won't be able to import it.  
> **username_2**: @AndrewChow: Do you mean the exact HD algorithms of Bitcoin Core are not standard (or can be considered a de-facto standard) and any vendor is actually free to implement HD in any way differently than what Bitcoin Core does?  
> **username_1**: @username_2 No, Bitcoin Core follows BIP 32. It is just that Bitcoin Core does not expose the same information that other wallets typically do.  

---

