<p>You should be able to load the wallet directly into a recent version of Bitcoin Core and it should load just fine. Compatibility has been maintained.</p>
<blockquote>
<p><strong>Does this sound like a feasible plan?</strong> Is there any information that is lost, when going throuigh <code>dumpwallet</code> as I describe? Will it still see every transaction that occurred and be able to do everything I could with the old wallet?</p>
</blockquote>
<p>You will lose all transaction data and any metadata like accounts (now referred to as labels and has a slightly different meaning) and key birth times.</p>
<blockquote>
<ul>
<li>The <code>bitcoind</code> binary that created this wallet was compiled with <code>--with-incompatible-bdb</code>. It is bdb5, I believe. <strong>If I want to run a more modern binary, I will have to compile it with that flag too, right?</strong> There's no way to 'downgrade' from 5 to 4.8 (which is the default, I believe), as I understand it? This is my main reason for trying to go through the <code>dumpwallet</code> approach.</li>
</ul>
</blockquote>
<p>Actually you don't. The wallet.dat file itself is compatible, it's some other temp files surrounding it that are not. However if you cleanly shutdown bitcoind, then those files will be cleaned up and everything consolidated into the wallet.dat file. It can be opened in a release version of Bitcoin Core. A clean shutdown means that the wallet.dat file will be portable, so if you are concerned that the other incompatible temp files remain, you can just keep the wallet.dat file and everything will be fine.</p>
<p>In any case, you can just try with a copy of the wallet file. If it is incompatible, you will just get an error saying so. Nothing is written if it can't be opened.</p>
<blockquote>
<p>So far, I have run the old code, with the old wallet, but it is showing a balance of &quot;0.000...&quot; and &quot;txcount:0&quot;, even after the block chain is fully downloaded, and even after doing <code>-rescan</code> on the wallet. I'm trying to figure out what the problem is, here.</p>
</blockquote>
<p>It is possible that you are not actually using the wallet that you think you are. For a long time Bitcoin Core would always create a new wallet if one did not exist. This would often result in people thinking they have restored their wallet (because a wallet was loaded) when in fact a new one was generated. This may be what is happening here.</p>
<p>Or maybe the wallet file just doesn't have anything in it.</p>
<blockquote>
<ul>
<li>There have been a few splits and many upgrades to bitcoin and I have not followed that stuff in detail. Could they explain why I am seeing &quot;0.000...&quot;? Maybe my old client is communicating with a new network and some information is lost, somehow?</li>
</ul>
</blockquote>
<p>No. Any transactions that exist before any splits would still be in the wallet. Furthermore, any transactions that are no longer in the blockchain would still appear because they are stored in your wallet. They would just appear as being unconfirmed or conflicted. That nothing appears indicates the wallet file contains nothing.</p>

CC BY-SA 4.0
2021-08-04T16:29:55.303Z
Thanks for the info. Regarding "not actually using the wallet that you think you are": I am using `bitcoind -wallet xxx.dat ...` to run the program (it is v0.15.1). Should that properly get it loaded, or is there something else you are referring to? Also: you say a (properly shut-down) bdb5 wallet should be compatible with a recent release version; but I thought the default was bdb4.8? Are you saying a bdb5 wallet be loaded with bdb4.8?
jwd
CC BY-SA 4.0
2021-08-04T16:35:20.973Z
The correct syntax is `-wallet=<wallet name>` and the wallet needs to be in the data directory. The only way to be absolutely sure that a new wallet isn't being created is to not use a version that makes new wallets when one doesn't exist. bdb5 and bdb4.8 use the same data format. Only the temp files format changed to be incompatible. So you can use the wallet.dat file created with bdb5 in a version built with bdb4.8.
Ava Chow
CC BY-SA 4.0
2021-08-04T23:29:30.243Z
Got it working; thank you again for the help. The old `bitcoind` was taking `-wallet=foo.dat` and creating an empty wallet of that name (I had `foo.dat` in the local directory, rather than copied into `~/.bitcoin/...` as I should have). Still using bdb5, but I assume that's not actually necessary, from what you said.
jwd
CC BY-SA 4.0
2021-08-04T05:00:00.270Z
2021-08-04T05:00:00.270Z
Ava Chow
<p>Yeah it show error some time but you can use pywallet.py to retrieve your privatekey easily. If you don't know how use it search on google pywallet.py you need Python2.7 or 3.9</p>

CC BY-SA 4.0
2021-08-16T03:39:20.643Z
2021-08-16T03:39:20.643Z
The Retriever
<p>I have an old wallet, created with a very old version of <code>bitcoind</code>, which I'm trying to access once again. I'm trying to understand the various issues that might be preventing me from seeing any balance, currently. I put the various questions I encountered in <strong>bold</strong>, below.</p>
<p>My plan was to access the old wallet using the old build of <code>bitcoind</code>, then run <code>dumpwallet</code> to get the private keys exported, and re-import those keys to a new wallet on a plain, modern build of the software.</p>
<p><strong>Does this sound like a feasible plan?</strong> Is there any information that is lost, when going through <code>dumpwallet</code> as I describe? Will it still see every transaction that occurred and be able to do everything I could with the old wallet?</p>
<p>Some relevant tidbits:</p>
<ul>
<li>The <code>bitcoind</code> binary that created this wallet was compiled with <code>--with-incompatible-bdb</code>. It is bdb5, I believe. <strong>If I want to run a more modern binary, I will have to compile it with that flag too, right?</strong> There's no way to 'downgrade' from 5 to 4.8 (which is the default, I believe), as I understand it? This is my main reason for trying to go through the <code>dumpwallet</code> approach.</li>
</ul>
<p>So far, I have run the old code, with the old wallet, but it is showing a balance of &quot;0.000...&quot; and &quot;txcount:0&quot;, even after the block chain is fully downloaded, and even after doing <code>-rescan</code> on the wallet. I'm trying to figure out what the problem is, here.</p>
<ul>
<li><p>There have been a few transactions on the wallet, over the years. Probably via different builds of <code>bitcoind</code> (I forget, exactly).</p>
</li>
<li><p>There have been a few splits and many upgrades to bitcoin and I have not followed that stuff in detail. Could they explain why I am seeing &quot;0.000...&quot;? Maybe my old client is communicating with a new network and some information is lost, somehow?</p>
</li>
</ul>
<hr />
<p><strong>Edit</strong>: The accepted answer got me on the right track; I was not getting the right wallet loaded.</p>
<p>The error messages from a modern build of <code>bitcoind</code> are much more useful than the old version I was using. Using <code>-wallet=filename.dat</code> was actually creating an empty wallet of that name, not using the one in the current directory. I had to make sure to copy the file to the <code>$HOME/.bitcoin/</code> directory, first.</p>

CC BY-SA 4.0
2021-08-04T02:50:44.243Z
@Prayank What info is in the metadata?
jwd
<wallet><wallet-recovery><compiling>
Salvaging an old, incompatible wallet with bitcoind
jwd
# Salvaging an old, incompatible wallet with bitcoind

(Asked by: username_0 on 2021-08-04)

I have an old wallet, created with a very old version of `bitcoind`, which I'm trying to access once again. I'm trying to understand the various issues that might be preventing me from seeing any balance, currently. I put the various questions I encountered in **bold**, below.

My plan was to access the old wallet using the old build of `bitcoind`, then run `dumpwallet` to get the private keys exported, and re-import those keys to a new wallet on a plain, modern build of the software.

**Does this sound like a feasible plan?** Is there any information that is lost, when going through `dumpwallet` as I describe? Will it still see every transaction that occurred and be able to do everything I could with the old wallet?

Some relevant tidbits:

* The `bitcoind` binary that created this wallet was compiled with `--with-incompatible-bdb`. It is bdb5, I believe. **If I want to run a more modern binary, I will have to compile it with that flag too, right?** There's no way to 'downgrade' from 5 to 4.8 (which is the default, I believe), as I understand it? This is my main reason for trying to go through the `dumpwallet` approach.

So far, I have run the old code, with the old wallet, but it is showing a balance of "0.000..." and "txcount:0", even after the block chain is fully downloaded, and even after doing `-rescan` on the wallet. I'm trying to figure out what the problem is, here.

* There have been a few transactions on the wallet, over the years. Probably via different builds of `bitcoind` (I forget, exactly).
* There have been a few splits and many upgrades to bitcoin and I have not followed that stuff in detail. Could they explain why I am seeing "0.000..."? Maybe my old client is communicating with a new network and some information is lost, somehow?

---

**Edit**: The accepted answer got me on the right track; I was not getting the right wallet loaded.

The error messages from a modern build of `bitcoind` are much more useful than the old version I was using. Using `-wallet=filename.dat` was actually creating an empty wallet of that name, not using the one in the current directory. I had to make sure to copy the file to the `$HOME/.bitcoin/` directory, first.

**Tags:** wallet, wallet-recovery, compiling

> **Comments:**
> **username_0**: @Prayank What info is in the metadata?  

---

## 2 answers

### Answer by username_1 on 2021-08-04. Score: 2 | Accepted answer

You should be able to load the wallet directly into a recent version of Bitcoin Core and it should load just fine. Compatibility has been maintained.

> **Does this sound like a feasible plan?** Is there any information that is lost, when going throuigh `dumpwallet` as I describe? Will it still see every transaction that occurred and be able to do everything I could with the old wallet?

You will lose all transaction data and any metadata like accounts (now referred to as labels and has a slightly different meaning) and key birth times.

> * The `bitcoind` binary that created this wallet was compiled with `--with-incompatible-bdb`. It is bdb5, I believe. **If I want to run a more modern binary, I will have to compile it with that flag too, right?** There's no way to 'downgrade' from 5 to 4.8 (which is the default, I believe), as I understand it? This is my main reason for trying to go through the `dumpwallet` approach.

Actually you don't. The wallet.dat file itself is compatible, it's some other temp files surrounding it that are not. However if you cleanly shutdown bitcoind, then those files will be cleaned up and everything consolidated into the wallet.dat file. It can be opened in a release version of Bitcoin Core. A clean shutdown means that the wallet.dat file will be portable, so if you are concerned that the other incompatible temp files remain, you can just keep the wallet.dat file and everything will be fine.

In any case, you can just try with a copy of the wallet file. If it is incompatible, you will just get an error saying so. Nothing is written if it can't be opened.

> So far, I have run the old code, with the old wallet, but it is showing a balance of "0.000..." and "txcount:0", even after the block chain is fully downloaded, and even after doing `-rescan` on the wallet. I'm trying to figure out what the problem is, here.

It is possible that you are not actually using the wallet that you think you are. For a long time Bitcoin Core would always create a new wallet if one did not exist. This would often result in people thinking they have restored their wallet (because a wallet was loaded) when in fact a new one was generated. This may be what is happening here.

Or maybe the wallet file just doesn't have anything in it.

> * There have been a few splits and many upgrades to bitcoin and I have not followed that stuff in detail. Could they explain why I am seeing "0.000..."? Maybe my old client is communicating with a new network and some information is lost, somehow?

No. Any transactions that exist before any splits would still be in the wallet. Furthermore, any transactions that are no longer in the blockchain would still appear because they are stored in your wallet. They would just appear as being unconfirmed or conflicted. That nothing appears indicates the wallet file contains nothing.

> **Comments:**
> **username_0**: Thanks for the info. Regarding "not actually using the wallet that you think you are": I am using `bitcoind -wallet xxx.dat ...` to run the program (it is v0.15.1). Should that properly get it loaded, or is there something else you are referring to? Also: you say a (properly shut-down) bdb5 wallet should be compatible with a recent release version; but I thought the default was bdb4.8? Are you saying a bdb5 wallet be loaded with bdb4.8?  
> **username_1**: The correct syntax is `-wallet=<wallet name>` and the wallet needs to be in the data directory. The only way to be absolutely sure that a new wallet isn't being created is to not use a version that makes new wallets when one doesn't exist. bdb5 and bdb4.8 use the same data format. Only the temp files format changed to be incompatible. So you can use the wallet.dat file created with bdb5 in a version built with bdb4.8.  
> **username_0**: Got it working; thank you again for the help. The old `bitcoind` was taking `-wallet=foo.dat` and creating an empty wallet of that name (I had `foo.dat` in the local directory, rather than copied into `~/.bitcoin/...` as I should have). Still using bdb5, but I assume that's not actually necessary, from what you said.  

---

### Answer by username_2 on 2021-08-16. Score: 0

Yeah it show error some time but you can use pywallet.py to retrieve your privatekey easily. If you don't know how use it search on google pywallet.py you need Python2.7 or 3.9


---

