<p>You can use the <code>dumpwallet</code> command and export the private keys to a text file. Do this for both wallets and then compare the text files. You should see the same addresses and private keys. If you do not, then something has gotten corrupted.</p>

CC BY-SA 4.0
2018-07-02T07:05:58.617Z
2018-07-02T07:05:58.617Z
Ava Chow
<p>I wouldn't take any chances and just move my funds to a new wallet. Starting bitcoin core without a wallet.dat file in the data directory should force it to generate a new wallet. Then you just send from the old wallet to an address in the new one.</p>

CC BY-SA 4.0
2018-08-02T07:56:50.553Z
2018-08-02T07:56:50.553Z
Abdussamad
<p>If you can sign and verify a message with every address, you're 100% sure as signing requires knowledge of the correct private key.
<a href="https://i.sstatic.net/ttegX.jpg" rel="nofollow noreferrer">https://i.sstatic.net/ttegX.jpg</a></p>

<p>You can do the verification with another client not holding your keys if that makes you feel more certain.</p>

CC BY-SA 3.0
2017-02-20T19:19:21.913Z
This raises the question of how to tell which addresses you should check.
Nate Eldredge
CC BY-SA 4.0
2018-08-02T07:54:17.200Z
@NateEldredge listunspent in the debug console will tell you which addresses have utxos sent to them.
Abdussamad
CC BY-SA 3.0
2016-09-23T14:59:02.867Z
2016-09-23T15:12:57.720Z
2016-09-23T15:12:57.720Z
hrobeers
<p>I recently ran into an issue with an unsafe shutdown corruption on an NTFS partition in such a way that the files all existed, but chkdsk had to be run to verify some non-essential files.</p>

<p>My peers.dat file was the only file chkdsk complained about, but I verified my blockchain to be sure. How can I ensure my private keys in my current wallet.dat match the ones in my backup? I don't believe it is corrupt (At least Bitcoin-QT hasn't complained yet), but I'd rather be safe.</p>

<bitcoin-core><client><wallet.dat>
How can I verify my wallet.dat file against an older version?
Candunc
# How can I verify my wallet.dat file against an older version?

(Asked by: username_0 on 2016-09-22)

I recently ran into an issue with an unsafe shutdown corruption on an NTFS partition in such a way that the files all existed, but chkdsk had to be run to verify some non-essential files.

My peers.dat file was the only file chkdsk complained about, but I verified my blockchain to be sure. How can I ensure my private keys in my current wallet.dat match the ones in my backup? I don't believe it is corrupt (At least Bitcoin-QT hasn't complained yet), but I'd rather be safe.

**Tags:** bitcoin-core, client, wallet.dat


---

## 3 answers

### Answer by username_1 on 2018-07-02. Score: 2

You can use the `dumpwallet` command and export the private keys to a text file. Do this for both wallets and then compare the text files. You should see the same addresses and private keys. If you do not, then something has gotten corrupted.


---

### Answer by username_2 on 2018-08-02. Score: 0

I wouldn't take any chances and just move my funds to a new wallet. Starting bitcoin core without a wallet.dat file in the data directory should force it to generate a new wallet. Then you just send from the old wallet to an address in the new one.


---

### Answer by username_3 on 2016-09-23. Score: 0

If you can sign and verify a message with every address, you're 100% sure as signing requires knowledge of the correct private key.
<https://i.sstatic.net/ttegX.jpg>

You can do the verification with another client not holding your keys if that makes you feel more certain.

> **Comments:**
> **username_4**: This raises the question of how to tell which addresses you should check.  
> **username_2**: @username_4 listunspent in the debug console will tell you which addresses have utxos sent to them.  

---

