<p>Newer BerkeleyDB databases are not backwards compatible.</p>

<p>Details: <a href="https://github.com/bitcoin/bitcoin/issues/6253" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/6253</a>
<a href="https://github.com/bitcoin/bitcoin/issues/3686#issuecomment-74836708" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/3686#issuecomment-74836708</a></p>

<p>Especially:</p>

<blockquote>
  <p>BDB is very painful to upgrade. My impression is that it was designed for setups where a database upgrade only happened with professional supervision. In particular, the write log files created for durability were sometimes not readable by later versions. This is the reason why Bitcoin Core releases have for years stuck with BDB 4.8 for the wallet.</p>
</blockquote>

<p><a href="https://bitcoin.stackexchange.com/a/51446">https://bitcoin.stackexchange.com/a/51446</a></p>

CC BY-SA 4.0
2018-10-02T16:22:26.283Z
What I'm trying to figure out...  If I have a wallet from years ago and I import it into a newer client that was built with a different Berkeley database unknowingly would I have any issues?
RansuDoragon
CC BY-SA 4.0
2018-10-02T16:29:19.483Z
I'd suggest creating a backup of the wallet. It might or might not work, it's impossible to know without experimenting. However, all (most? I'm sure that it is since 0.8.0, and 100% the same major release, 4) Bitcoin Core versions use the same version of Berkeley DB.
MCCCS
CC BY-SA 4.0
2018-10-02T16:32:43.003Z
I use Arch Linux and I'm only now noticing the official package they have is built with the newest DB they have.  I may have deleted old wallets I thought were empty.   It did display a wallet address.
RansuDoragon
CC BY-SA 4.0
2018-10-03T16:01:32.217Z
@RansuDoragon You can build Bitcoin Core from depends. It downloads the dependencies with preferred versions automatically using scripts. Here are the instructions: https://github.com/bitcoin/bitcoin/tree/master/depends
MCCCS
CC BY-SA 4.0
2018-10-02T16:20:24.780Z
2018-10-02T16:20:24.780Z
MCCCS
<p>You can always open a wallet.dat file created with an older BDB using software using a newer BDB. However, when doing so, the file will be upgraded and not be compatible anymore with the older BDB version that created it. This is even the case for minor version upgrades (4.7 vs 4.8 for example).</p>

<p>Bitcoin Core release binaries have used BDB 4.8 since release 0.4 (September 2011), but self-compiled versions or versions shipped with Linux distributions may use other BDB versions.</p>

CC BY-SA 4.0
2018-12-08T16:07:01.920Z
This is what I wondering. Thanks for answering. I just wanted to be sure that opening a file from years ago with a newer client wasn't going to break the wallet file.
RansuDoragon
CC BY-SA 4.0
2018-12-03T03:34:13.290Z
2018-12-03T03:34:13.290Z
Pieter Wuille
<p>Is a Bitcoin client built with a newer Berkeley Database incompatible with a wallet file from a older client? Or is it that a wallet made from a newer Berkeley Database not compatible with an older client?   </p>

<p>EDIT: What I'm trying to figure out... If I have a wallet from years ago and I import it into a newer client that was built with a different Berkeley database unknowingly would I have any issues? </p>

<wallet><client>
Bitcoin built with a newer Berkeley Database incompatible with a older wallet?
RansuDoragon
# Bitcoin built with a newer Berkeley Database incompatible with a older wallet?

(Asked by: username_0 on 2018-10-02)

Is a Bitcoin client built with a newer Berkeley Database incompatible with a wallet file from a older client? Or is it that a wallet made from a newer Berkeley Database not compatible with an older client?

EDIT: What I'm trying to figure out... If I have a wallet from years ago and I import it into a newer client that was built with a different Berkeley database unknowingly would I have any issues?

**Tags:** wallet, client


---

## 2 answers

### Answer by username_2 on 2018-12-03. Score: 4 | Accepted answer

You can always open a wallet.dat file created with an older BDB using software using a newer BDB. However, when doing so, the file will be upgraded and not be compatible anymore with the older BDB version that created it. This is even the case for minor version upgrades (4.7 vs 4.8 for example).

Bitcoin Core release binaries have used BDB 4.8 since release 0.4 (September 2011), but self-compiled versions or versions shipped with Linux distributions may use other BDB versions.

> **Comments:**
> **username_0**: This is what I wondering. Thanks for answering. I just wanted to be sure that opening a file from years ago with a newer client wasn't going to break the wallet file.  

---

### Answer by username_1 on 2018-10-02. Score: 0

Newer BerkeleyDB databases are not backwards compatible.

Details: <https://github.com/bitcoin/bitcoin/issues/6253>
<https://github.com/bitcoin/bitcoin/issues/3686#issuecomment-74836708>

Especially:

> BDB is very painful to upgrade. My impression is that it was designed for setups where a database upgrade only happened with professional supervision. In particular, the write log files created for durability were sometimes not readable by later versions. This is the reason why Bitcoin Core releases have for years stuck with BDB 4.8 for the wallet.

<https://bitcoin.stackexchange.com/a/51446>

> **Comments:**
> **username_0**: What I'm trying to figure out...  If I have a wallet from years ago and I import it into a newer client that was built with a different Berkeley database unknowingly would I have any issues?  
> **username_1**: I'd suggest creating a backup of the wallet. It might or might not work, it's impossible to know without experimenting. However, all (most? I'm sure that it is since 0.8.0, and 100% the same major release, 4) Bitcoin Core versions use the same version of Berkeley DB.  
> **username_0**: I use Arch Linux and I'm only now noticing the official package they have is built with the newest DB they have.  I may have deleted old wallets I thought were empty.   It did display a wallet address.  
> **username_1**: @username_0 You can build Bitcoin Core from depends. It downloads the dependencies with preferred versions automatically using scripts. Here are the instructions: https://github.com/bitcoin/bitcoin/tree/master/depends  

---

