2

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?

1 Answer 1

1

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.

4
  • Cheers @Andrew Chow! I guess there are Consequences :)
    – mikest
    Commented Jan 11, 2022 at 19:02
  • 1
    is backing up the wallet.dat file from folders is enough, or do you have to backup the whole folder?
    – mikest
    Commented Jan 11, 2022 at 19:05
  • 3
    @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
    Commented Jan 11, 2022 at 19:56
  • Great! You have many aces up your sleeve, Andrew!
    – mikest
    Commented Jan 11, 2022 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.