<p>If you're running master, there was a recent migration that would cause this. </p>

<p>you can run this to fix it:
<code>node migrate/chaindb2to3.js /path/to/chaindb.ldb</code></p>

<p>That will take a very long time, but if you don't mind pruning your DB at the same time, you can run this instead and it will be much faster: 
<code>node migrate/chaindb2to3.js /path/to/chaindb.ldb --prune</code></p>

<p>If that doesn't work you can always reset the DB and resync.
Just remove all .ldb files from ~/.bcoin dir and restart bcoin.</p>

CC BY-SA 3.0
2017-08-10T22:15:54.880Z
I'm upgrading from beta8 to beta14... the db is NOT `chaindb.ldb` but `chain.ldb`
pinhead
CC BY-SA 3.0
2017-08-03T21:06:44.947Z
2017-08-03T21:06:44.947Z
Thann
<p>I was resyncing my bcoin node and got the following error:</p>

<pre><code> Error: Warning: Your database does not match the current database version. 
 This is likely because the database layout or serialization format has changed drastically. 
 If you want to dump your data, downgrade to your previous version first. 
 If you do not think you should be seeing this error, post an issue on the repo.
   at LowlevelUp.checkVersion (/root/bcoin/lib/db/lowlevelup.js:603:11)
   at &lt;anonymous&gt;
</code></pre>

<database><full-node><javascript><leveldb><bcoin>
Resyncing bcoin brings up database version error
Bucko
# Resyncing bcoin brings up database version error

(Asked by: username_0 on 2017-08-03)

I was resyncing my bcoin node and got the following error:

```
 Error: Warning: Your database does not match the current database version. 
 This is likely because the database layout or serialization format has changed drastically. 
 If you want to dump your data, downgrade to your previous version first. 
 If you do not think you should be seeing this error, post an issue on the repo.
   at LowlevelUp.checkVersion (/root/bcoin/lib/db/lowlevelup.js:603:11)
   at <anonymous>

```

**Tags:** database, full-node, javascript, leveldb, bcoin


---

## 1 answers

### Answer by username_1 on 2017-08-03. Score: 2 | Accepted answer

If you're running master, there was a recent migration that would cause this.

you can run this to fix it:
`node migrate/chaindb2to3.js /path/to/chaindb.ldb`

That will take a very long time, but if you don't mind pruning your DB at the same time, you can run this instead and it will be much faster:
`node migrate/chaindb2to3.js /path/to/chaindb.ldb --prune`

If that doesn't work you can always reset the DB and resync.
Just remove all .ldb files from ~/.bcoin dir and restart bcoin.

> **Comments:**
> **username_2**: I'm upgrading from beta8 to beta14... the db is NOT `chaindb.ldb` but `chain.ldb`  

---

