<p>Since <code>wallet.dat</code> is mostly a collection of private keys, you will simply lose all private keys that you <strong>have not</strong> duplicated or copied. It also by default stores the next 100 Bitcoin addresses it will give you when you generate a new address as a safety measure.</p>
<p><strong>Bottom line</strong></p>
<p>You will lose the copy of the private keys to addresses you've created or added but you won't destroy them. A backup will save you regardless if <code>wallet.dat</code> exists or not. If you restore <code>wallet.dat</code> from a backup, you:</p>
<ul>
<li>will not lose past transactions, those are stored by the network, not you.</li>
<li>will not lose ownership of any bitcoins you may have acquired under the private keys you backed up, generating a new one and not creating a backup <em>may</em> result in loss. Keep in mind first 100 addresses are stored in <code>wallet.dat</code>.</li>
<li>will not need to know the address of a public key. Those are derived from the private key mathematically.</li>
</ul>

CC BY-SA 3.0
2014-03-26T14:04:12.517Z
If I lose wallet.dat but have the private keys derived from wallet.dat, would I be able to have access to my coins again?
rdadkins
CC BY-SA 3.0
2014-03-26T15:13:44.070Z
@fatso113 Yes.  You can access your coins without a wallet, so long as you have the private keys.  Be careful, though, so can anyone else!
oks
CC BY-SA 3.0
2014-03-26T17:19:27.647Z
This was confusing because I got mixed up with BIP38 encryption with paper wallets. I understand now
rdadkins
CC BY-SA 4.0
2014-03-26T04:34:25.213Z
2021-01-13T01:34:11.960Z
2021-01-13T01:34:11.960Z
John T
<p>I have this question, say I have my coins in my local wallet and 1 of 2 things can happen, say I somehow delete the wallet.dat file or some kind of malware deletes the file. I have the password <strike>private key</strike> to the wallet, would I need the wallet.dat file to recover the bitcoins or could I just recover with the private key to the address? Would I need both?</p>

CC BY-SA 3.0
2014-03-26T04:15:04.217Z
`wallet.dat` is mostly a collection of private keys for multiple addresses.
John T
CC BY-SA 3.0
2014-03-26T04:19:01.143Z
In the off chance I lose access to it, what can happen?
rdadkins
CC BY-SA 3.0
2014-03-26T09:00:00.647Z
@fatso113: I think you may be confusing "private key" with "password". The private keys are in the wallet file, the password to the wallet will not help you if you don't have the wallet itself. You will lose all your coins if you don't have a backup of the file.
Meni Rosenfeld
CC BY-SA 3.0
2014-03-26T14:01:14.800Z
Thank you, sorry for not being very clear
rdadkins
<private-key><backup><wallet.dat>
What happens if I delete wallet.dat?
rdadkins
# What happens if I delete wallet.dat?

(Asked by: username_0 on 2014-03-26)

I have this question, say I have my coins in my local wallet and 1 of 2 things can happen, say I somehow delete the wallet.dat file or some kind of malware deletes the file. I have the password private key to the wallet, would I need the wallet.dat file to recover the bitcoins or could I just recover with the private key to the address? Would I need both?

**Tags:** private-key, backup, wallet.dat

> **Comments:**
> **username_1**: `wallet.dat` is mostly a collection of private keys for multiple addresses.  
> **username_0**: In the off chance I lose access to it, what can happen?  
> **username_2**: @fatso113: I think you may be confusing "private key" with "password". The private keys are in the wallet file, the password to the wallet will not help you if you don't have the wallet itself. You will lose all your coins if you don't have a backup of the file.  
> **username_0**: Thank you, sorry for not being very clear  

---

## 1 answers

### Answer by username_1 on 2014-03-26. Score: 5 | Accepted answer

Since `wallet.dat` is mostly a collection of private keys, you will simply lose all private keys that you **have not** duplicated or copied. It also by default stores the next 100 Bitcoin addresses it will give you when you generate a new address as a safety measure.

**Bottom line**

You will lose the copy of the private keys to addresses you've created or added but you won't destroy them. A backup will save you regardless if `wallet.dat` exists or not. If you restore `wallet.dat` from a backup, you:

* will not lose past transactions, those are stored by the network, not you.
* will not lose ownership of any bitcoins you may have acquired under the private keys you backed up, generating a new one and not creating a backup *may* result in loss. Keep in mind first 100 addresses are stored in `wallet.dat`.
* will not need to know the address of a public key. Those are derived from the private key mathematically.

> **Comments:**
> **username_0**: If I lose wallet.dat but have the private keys derived from wallet.dat, would I be able to have access to my coins again?  
> **username_3**: @fatso113 Yes.  You can access your coins without a wallet, so long as you have the private keys.  Be careful, though, so can anyone else!  
> **username_0**: This was confusing because I got mixed up with BIP38 encryption with paper wallets. I understand now  

---

