# « Invalid data encryption key »: backup refused
This page is intended for administrators whose agent is being rejected because of the data encryption key, and for those about to change it. It explains the purpose of this key, why the server rejects it, and what happens if it is lost. It applies to the BeBackup 7 agent and server.
Symptom
The backup or connection test fails with one of the following messages, often preceded by An error occurred on the server …::
Invalid data encryption key.The data encryption key fingerprint does not match the one defined in the backup settings.
The purpose of the key
Data is encrypted on the workstation, before being sent, using the key entered in the agent under Data encryption key:. This field is mandatory: without it, the agent displays Please enter the data encryption key.
The server does not know this key. It only retains a fingerprint, which allows it to check that an agent is presenting the same key as during previous backups. It therefore cannot decrypt your data.
Important consequence: if the key is lost, the backups made with it can no longer be restored, by anyone. Keep the key for each container in a safe place, separate from the workstation being backed up.
Cause
"Invalid data encryption key"
The key entered in the agent is not the one used for the backups already present in the container. The most common cases are:
- the agent has been reinstalled and a different key has been entered;
- a new key has been generated by mistake;
- the workstation has been attached to another workstation's container.
The server refuses the backup so as not to mix, within the same container, data encrypted with two different keys.
"The fingerprint … does not match"
The backup settings in the web interface enforce a key, through the Force data encryption key (SHA-1) setting. The key entered in the agent does not match this fingerprint.
Checks
- Find the key originally used for this container, in your password vault or your documentation.
- Check that it is identical, including capitalisation, to the one entered in the agent.
- If you are unsure between several keys, test them from the web interface, as described below.
- For the second message, check with the person who filled in
Force data encryption key (SHA-1)which key this fingerprint was derived from. The fingerprint is produced by several successive calculations: it cannot be compared manually with the key.
To test a key from the web interface:
- in the computer list, select the container;
- in the actions menu, choose
Check the container encryption key; - enter the candidate key, then confirm.
The server indicates whether it matches. Nothing is modified. This action requires the Run the container encryption key verification command permission on your account.
Resolution
Restoring the correct key in the agent
- Open the agent settings.
- In
Data encryption key:, enter the original key. - Click
Test connection. Once the test succeeds, save.
For the second message
Correct either the agent's key or the Force data encryption key (SHA-1) setting in the backup settings, so that they match.
If the original key has been lost
The existing backups in this container can no longer be restored. To resume backups, you must start afresh with a new key on a new container. Contact your service provider or BeBackup support to arrange this change. Keep the old container until you are certain the key has been lost.
Changing the key
The agent offers a button that generates a 48-character key. If a key is already defined for the profile, it asks for confirmation:
An encryption key is already defined for this profile. Replacing it will make all backups already made with the old key UNREADABLE: the server does not know it and will not be able to decrypt them. Do you really want to generate a new key?
Only confirm if you genuinely intend to abandon the existing backups, or if the profile has not yet backed anything up. Make a note of the new key before saving.
Changing the key without losing existing backups
The BeBackup server can also change the key of an existing container: it reads the data back with the old key and rewrites it with the new one, and backups already made remain restorable. This operation is launched from the command line on the server, and requires knowledge of the old key. Contact your service provider or BeBackup support to carry it out.
If the problem persists
Contact BeBackup support. Include the container name, the full message and the date of the last successful backup. Never send your encryption key.
BeBackup is backup built for IT service providers
Backup and restore of workstations, servers, virtual machines and Microsoft 365, encrypted at source with a key we do not hold, on the hosting of your choice.