WhatsApp has a database directory that is encrypted for security reasons. In older terminals it was in the flash storage memory, inside a directory called WhatsApp. On new systems it will be in Android > com.whatsapp > WhatsApp > Databases (if you have stored it on the SD memory card, then it should be in WhatsApp > Databases). There you will find the files of msgstore databases, with backup copies of the content of chats, messages, and other information such as status, timestamps, shared files, etc., so that it can be restored at any time automatically or manually.
You will see that there are several, and it is that WhatsApp creates a copy every so often, so you can restore the copy of the different days depending on what you need to recover.
As to format or nomenclature from the WhatsApp database file, you have the following:
In this case, the parts of the name will give data on the type of backup that is:
- YYYY being the year, such as 2022.
- mm is the month in which the backup was made, such as 06.
- dd is the day of the month the backup was taken, such as 30.
- .db indicates that this is a database.
- .crypt* this other part denotes that it is an encrypted file, that is, it is not in plain text or as a binary. And the asterisk can be 9, 10, 12, 14… The higher the number, the more secure the encryption, but it will also take longer to encrypt and decrypt. For example, a 14 is safer than a 12, and a 12 is safer than a 10.
For example, we could have a file named as follows:
Regarding the structure of the Whatsapp msgstore database, it has the following content structure:
- List status.
- Participation in groups
- individual chats
All of this data is also backed up when you sync the backup you gets on the cloud. Then many will wonder what is the point of also storing them locally and taking up space in memory. The answer is clear, and it is that this allows you to restore backups whenever you want even when you cannot access the cloud server where it is stored. This is a clear advantage, and can save you in certain situations.
Can it be deleted?
One of the most frequent questions about msgstore is if it can be deleted to save space. And yes, it can be deleted, in fact, when the WhatsApp cache is deleted, the msgstore files that you have stored will also be deleted. This does not really affect the operation of the app itself, but it could leave you without a local copy in case you had to restore it due to some problem.
On the other hand, it is advisable to remove some stored databases with previous copies, because it is not necessary, that is, just leave the last copy established and not have multiple backup copies that expire if you used them, it would be restored to a version much earlier than the last one. However, if for some reason you are one of those who frequently delete chats, such as in a company WhatsApp, it is possible that at a given moment you are interested in restoring a specific version of the database and you need to have all the possible msgstores.
Of course, remember that msgstore.db.crypt14 is the latest version of the database, the one that you don't have to delete if you don't want to lose the history of now. In other words, it is the database that is already in use by WhatsApp, so you should never touch it. You can neither rename it, nor change its location, nor delete it if you don't want all your current chats in the instant messaging app to go to waste. On the other hand, there will be msgstores-YYYY-MM-DD.1.db.crypt14 which will be the backup of the database, and if you delete it the current chat will not be affected, but that backup will be lost.
The rest of the files present in the Database directory they can be removed if you don't want older versions to that. That's how simple the sinister msgstore is!