File and Directory Restoration for cPanel

Valid for version 82

Version:

82

84


Last modified: May 11, 2021

Note:

To use this feature, your system administrator or hosting provider must enable account backups and other configurations in WHM’s Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration).

Overview

The File and Directory Restoration interface allows you to restore files or folders from saved backups. This interface is useful if you want to restore a specific file or folder to a previous state. For example, if you accidentally deleted a file or want to undo changes to a directory, you can restore to the latest backup version. This interface can restore deleted files and will overwrite existing files.

Note:
  • This interface only uses backups that exist on your server. To use remote backups, you must transfer them to the local server.

  • You cannot restore the .cpanel or mail folders in this interface. To restore these directories, you must use cPanel’s Backup interface (cPanel >> Home >> Files >> Backup).

The File and Directory Restoration interface

This interface contains two sections. The Files and Directories section shows the files and folders you can restore. The Backups section lists the dates for all available backup versions.

If you know the path to the file or folder you want to restore, you can enter it directly. We recommend this setting for advanced users. New users can browse files and folders to view the available backup files.

Enter a direct path to restore a file or directory

Remember:

New users should browse for files or folders.

Note:

The system will not show a directory’s contents for the Enter a path setting.

You can restore a file or directory from a direct path through your cPanel account’s home directory. To do so, perform the following steps:

  1. In the Files and Directories section, select Enter a path.

  2. Enter the direct path to the file or directory in the text box. The text box’s path is the cPanel account user’s home directory path. For example, enter public_html in the text box for the direct path to the /home/user/public_html directory. In this directory path, user represents the cPanel account’s username.

  3. Click Show Backups to list the backups for that file or directory. The backups will appear in the Backups section of the interface.

  4. In the Backups section, choose the backup that you wish to restore and click Restore.

  5. The interface will ask you to confirm the restoration. Click Restore to confirm. A success or failure message will appear.

Browse for files or folders

You can browse to find the file or folder that you wish to restore. To do so, perform the following steps:

  1. In the Files and Directories section, select Browse files and directories. All available files and folders will appear. You can click a folder’s name to view more files and folders.

  2. Click Show Backups to list the available backup files for that file or folder. The backup files will appear in the Backups section with the corresponding date.

  3. In the Backups section, choose a backup file and click Restore.

  4. The system will ask you to confirm the restoration. Click Restore to confirm. A success or failure message will appear.

Files and folders that you successfully restore will now appear in the Files and Directories section.

Additional Documentation