<p>Each wallet folder contains all of the data for a wallet. If you delete a folder, you delete a wallet and all of its data. This includes any and all private keys, unless you have made a backup of that wallet.</p>
<p>The wallet.dat that is not in a folder is the wallet data file for the default wallet (the wallet whose name is the empty string). If you only backup this wallet.dat, you are only backing up the default wallet and none of the other wallets.</p>
<p>Older versions of Bitcoin Core will automatically create new wallets when it is told to open a wallet of a name if that wallet does not exist. It sounds like you are using an older version of Bitcoin Core which does that. It is seeing that you want to have wallets with specific names opened, but since those wallets do not exist, it is automatically creating them. Although these wallets are named the same, they are entirely different wallets. They contain different private keys and addresses. They are not related in any way, shape, or form, to the original that you deleted. This automatic creation behavior was removed recently.</p>

CC BY-SA 4.0
2022-01-11T19:02:15.257Z
Cheers @Andrew Chow!  I guess there are Consequences :)
mikest
CC BY-SA 4.0
2022-01-11T19:05:09.737Z
is backing up the wallet.dat file from folders is enough, or do you have to backup the whole folder?
mikest
CC BY-SA 4.0
2022-01-11T19:56:24.620Z
@mikest You should use the backup functionality built into Bitcoin Core itself. When the wallet is in use (and even when not in use), not all data is necessarily stored in the wallet.dat file. However if you use the built in backup functions, then the backup file exported will have all of the wallet's data. That backup file is still just a copy of the wallet.dat file, but it is created only after the wallet has ensured all data is present in the file.
Ava Chow
CC BY-SA 4.0
2022-01-11T20:07:17.440Z
Great! You have many aces up your sleeve, Andrew!
mikest
CC BY-SA 4.0
2022-01-11T18:28:50.640Z
2022-01-11T18:28:50.640Z
Ava Chow
<p>One can generate many wallets from Bitcoin Core GUI, but for each one generated, a new folder appears with its name which contains few files.</p>
<p>Still, if you delete those folders, but maintain the wallet.dat file in the main Bitcoin Core folder, they will appear and you will be able to switch into them from Bitcoin Core GUI.</p>
<p>The question is whether deleting those folders can somehow compromise those wallets. E.g. Are the addresses generated before such folder deletion will 'perform' in exactly the same way as they would if the folder would still exist?</p>
<p>Another way to look at it is, if you just backup the wallet.dat files without the folders of the wallets you created, will that be enough for keeping and spending your BTC, or do you need to backup those folders too?</p>

<bitcoin-core><wallet.dat>
Consequence of deleting a Bitcoin Core wallet folder
mikest
# Consequence of deleting a Bitcoin Core wallet folder

(Asked by: username_0 on 2022-01-11)

One can generate many wallets from Bitcoin Core GUI, but for each one generated, a new folder appears with its name which contains few files.

Still, if you delete those folders, but maintain the wallet.dat file in the main Bitcoin Core folder, they will appear and you will be able to switch into them from Bitcoin Core GUI.

The question is whether deleting those folders can somehow compromise those wallets. E.g. Are the addresses generated before such folder deletion will 'perform' in exactly the same way as they would if the folder would still exist?

Another way to look at it is, if you just backup the wallet.dat files without the folders of the wallets you created, will that be enough for keeping and spending your BTC, or do you need to backup those folders too?

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


---

## 1 answers

### Answer by username_1 on 2022-01-11. Score: 1 | Accepted answer

Each wallet folder contains all of the data for a wallet. If you delete a folder, you delete a wallet and all of its data. This includes any and all private keys, unless you have made a backup of that wallet.

The wallet.dat that is not in a folder is the wallet data file for the default wallet (the wallet whose name is the empty string). If you only backup this wallet.dat, you are only backing up the default wallet and none of the other wallets.

Older versions of Bitcoin Core will automatically create new wallets when it is told to open a wallet of a name if that wallet does not exist. It sounds like you are using an older version of Bitcoin Core which does that. It is seeing that you want to have wallets with specific names opened, but since those wallets do not exist, it is automatically creating them. Although these wallets are named the same, they are entirely different wallets. They contain different private keys and addresses. They are not related in any way, shape, or form, to the original that you deleted. This automatic creation behavior was removed recently.

> **Comments:**
> **username_0**: Cheers @Andrew username_1!  I guess there are Consequences :)  
> **username_0**: is backing up the wallet.dat file from folders is enough, or do you have to backup the whole folder?  
> **username_1**: @username_0 You should use the backup functionality built into Bitcoin Core itself. When the wallet is in use (and even when not in use), not all data is necessarily stored in the wallet.dat file. However if you use the built in backup functions, then the backup file exported will have all of the wallet's data. That backup file is still just a copy of the wallet.dat file, but it is created only after the wallet has ensured all data is present in the file.  
> **username_0**: Great! You have many aces up your sleeve, Andrew!  

---

