Retain and download deleted files


Depending on your file retention settings, you may be able to use the Code42 agent to restore files that you backed up but are no longer on your device. This article explains how to restore deleted files.

Retention settings for deleted files

If you back up a file and later delete it from your device, the Code42 agent keeps it in your backup archive for as long as indicated by your deleted files retention setting. Your administrator may adjust or lock this retention setting.

Deleted files retention for ransomware
Some ransomware programs change file extensions, causing the Code42 agent to think the original files were deleted. This results in the original files being removed at the time set by the Remove deleted files value in the Frequency and Versions settings. Therefore, a longer deleted file retention setting increases the chance you will be able to restore affected files in the event of a ransomware attack.


To learn how to verify or change your deleted file retention setting, see our article on specifying version settings.

Download deleted files

You can download deleted files from both the Code42 agent and the Code42 console.

Code42 agent

The Code42 agent stores deleted files based on your deleted file retention settings. To see or search for deleted files:

  1. From Home, navigate to a list of backed-up files:
  1. Click Restore Files.
  2. (Applies only if you have multiple devices) From the menu, select the device that originally backed up the files you want to restore.
  1. If you back up to multiple destinations, select the destination from Restore files from.
    The backup set list appears after Restore files from if you have multiple backup sets that use the same destination. Select the backup set that contains the files you want.

  2. Click the options menu.
    Restore deleted files
  3. Choose Include deleted files.
    Deleted files are shown with a trash can icon to the right of the Date Modified column.
  4. Select the files that you want to restore. 
  5. Click Restore Files.

After you enable Include deleted files, your deleted files appear in the file browser and can be restored. You may also search for deleted files by entering a term in the search bar.

Learn more about downloading files from the Code42 agent.

Download files from an earlier date
If you know when the files were deleted, you can view your entire backup as of a date before the files were deleted. From Restore Files, click As of Today to open a calendar and select a previous date. The Options screen refreshes with the files that were backed up as of that date, including any files that have since been deleted.

Code42 console

To display or search deleted files from the Code42 console:

  1. Sign in to the Code42 console.
  2. Select Devices.
  3. Locate the device containing the files you want to download and click Restore.
  4. Choose Display deleted files.
    The file tree refreshes to include deleted files.
  5. Select the files you want to download, and click Restore.
    Click the arrow next to a file to view and select a specific version of that file to restore. Time stamps next to file versions are displayed in Coordinated Universal Time (UTC).

For more information on web restores, see downloading files from the Code42 console.

Not available in the Code42 federal cloud
Web restores are not available in the Code42 federal cloud. Instead, use the Code42 if you need to download files, or contact your administrator for help.

Display deleted files in the administration console

Download files from an earlier date
If you know the date that the files were deleted, you can view your entire backup "as of" a date prior to deleting the files. From the Restore files as of calendar, select a previous date. The file tree will refresh with the files that were backed up as of that date, including any files that have since been deleted.

Can I use Code42 to archive files deleted from my device?

No. Do not use Code42 as a data-archive service. Deleted files are only retained for a maximum of 90 days. In addition:

  • If you deselect a folder from your backup file selection, any deleted files that were stored there are also deleted from your archive.
  • If you, or your administrator, change your deleted files retention setting, it could remove deleted files from your archive.

Since files deleted from your device have less visibility, it increases the possibility that changing your backup file selection or settings could result in accidental data loss.

Keep a copy of your files on your computer
Keep a copy of your files on the source device or drive. With archive maintenance, the health of your backup is validated and checked for data corruption. If bad blocks of data are found, the destination self-heals by re-requesting the affected data blocks from the source device.