Files encrypted by Windows (EFS) are not backed up or not restored
This page is intended for administrators whose users encrypt files with EFS (Encrypting File System), the Windows "Encrypt contents to secure data" option. It explains why these files cause problems in file-by-file backups, and which methods allow them to be backed up and restored. It concerns the BeBackup agent for Windows.
Symptom
Depending on the backup method, you will see one of the following cases:
- In a folder backup, the encrypted files are reported as errors, with a line reading
Le fichier "…" demandé par le serveur a généré une erreur à l'ouverture (E…). - When restoring a disk image backup, the report contains a line flagging an encrypted (EFS) file that was not restored, usually ending with
Ce fichier n'est PAS restauré. - A restored file exists, but will not open.
Files encrypted with EFS are displayed with a padlock in Windows Explorer.
Cause
An EFS file is encrypted with a key belonging to the user. Only authorised accounts can read its contents in clear.
The BeBackup agent service does not run under the user's account. In a folder backup, it reads files through the standard Windows path. It therefore cannot read the contents of a file encrypted by a user.
Disk image backup works differently. It reads the NTFS volume directly. It records the encrypted content exactly as it is on the disk, together with the file's key information. It does not need to decrypt anything.
Checks
- In the agent, open the profile's source selection screen.
- Click
Fichiers cryptés. The window opens empty. - Click
Rechercher. The tool searches for EFS-encrypted files within the current selection and displays the list. - Compare this list with the files reported as errors in the backup report.
The tool only scans selected folders on a local disk identified by a drive letter (D:\…). It searches neither network shares, nor disks backed up as images, nor folders added by a directive: an encrypted file in these locations will not appear in the list.
Resolution
Choose one of the two methods.
Method 1: back up the volume as a disk image
Disk image backup saves encrypted files without decrypting them.
- On the source selection screen, click
Disques et partitions. - Select the partition holding the encrypted files.
- Choose the
SmartImage / fichier par fichier (recommandé)mode. - Save the profile.
On restore, the file is written back encrypted, with the same keys as originally. It remains readable by the same users, and by them alone.
A restored encrypted file will only open if the user's key exists on the machine. This key is part of the user's Windows profile. If the profile has been lost, for example on a reinstalled machine, also restore the user's profile, or use an EFS recovery agent from your domain.
Method 2: decrypt the files before backup
The Fichiers cryptés tool can remove EFS encryption from the files found. Decryption runs under the account that opened the agent, and EFS requires the key of the file's owner: open the agent from the session of the user who owns the files. An administrator cannot decrypt another user's files.
- On the source selection screen, click
Fichiers cryptés. - Click
Rechercher, wait for the search to finish, then clickDécrypter les fichiers. - Confirm the prompt
Voulez-vous décrypter les fichiers trouvés ?
If some files cannot be decrypted, the tool lists them after Des erreurs se sont produites sur les fichiers suivants :.
Decryption removes EFS protection from these files. They become readable by any account with access to the folder. Agree this with the data owner.
Restore messages
When restoring a disk image backup, an encrypted file may fail with one of the following messages. Most of them end with Ce fichier n'est PAS restauré.
"…" est chiffré (EFS) mais son attribut "$EFS" est absent de la sauvegarde: the key information is missing from the backup. The encrypted content alone cannot be made readable."…": l'attribut "$EFS" n'a pas pu être lu (…).The key information exists but could not be read back.- A message continuing with
et son flux d'export n'a pas pu être fabriqué (…). Ce fichier n'est PAS restauré.: the agent could not reconstruct the encrypted file from the backup. The text in brackets gives the reason. "…" est chiffré (EFS) et Windows a refusé de le reposer (…).Windows refused to write the encrypted file. The text in brackets gives the reason. Check the free space and the permissions on the destination folder. Also check that the destination volume is NTFS: EFS only exists on NTFS."…" est chiffré (EFS) et sa restauration a échoué (…).The text in brackets gives the reason; the same checks apply.
If the problem persists
Contact BeBackup support. Please include:
- the path of an affected file;
- the profile's backup mode;
- the backup or restore report;
- the agent service log,
bbAgent-service.log.
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.