Knowledgebase

File and Directory Restoration for WHM  Print this Article

Overview:

Important:

To use this feature, you must enable account backups in WHM’s Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration). Additionally, several settings exist that will disable the File and Directory Restoration interfaces in cPanel & WHM under certain conditions. For more information, read the How to Manage Metadata Settings document.

The File and Directory Restoration interface allows you to restore items from the local backups of your cPanel account users.

Note:
  • This interface allows you to restore items from only local backup files. If you wish to restore items from remote backup files, you must transfer the desired remote backup files to the local server.

  • This interface does not allow you to restore a cPanel account’s .cpanel and mail directories. To restore these directories, you must perform a full account backup restoration.

  • The system will restore deleted files and will overwrite existing files.

The File and Directory Restoration interface

To begin, select a cPanel account name from the list and click View Backups. The next interface contains two sections, Files and Directories and Backups. The Files and Directories section shows the files and directories that contain backups. The backups will appear in the Backups section.

You can access backups from this interface in two ways. You can enter a direct path to the file or directory, or you can browse through files and directories to find the file that you wish to restore.

Note:

You can set the number of backups that the local disk stores in WHM’s Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration). Edit the Retention setting under the Scheduling and Retention section.

Enter a direct path to restore a file or directory

Note:
Select Browse files and directories to view a directory’s contents. The system will not show a directory’s contents when you select Enter a path.

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 system will ask you to confirm the restoration. Click Restore to confirm. A success or failure message will appear.

Browse your home directory to restore a file or directory

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

  1. In the Files and Directories section, select Browse files and directories. The contents of the cPanel account user’s home directory will appear.

    • To see a directory’s contents, click on the directory’s name.
  2. Click Show Backups to list the backups for that file or directory. The backups will appear in the Backups section of the interface.

  3. In the Backups section, choose the backup that you wish to restore 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 directories that you successfully restore will now appear in the cPanel account user’s home directory.

Was this answer helpful?

Related Articles

Backup Configuration
Overview: The Backup Configuration interface allows system administrators to customize their...
Backup Restoration
Overview: This interface restores cPanel accounts from local backups or backups on a remote FTP...
Backup System Migration
Important: The Backup System Migration interface only appears when backups exist under the...
Backup User Selection
Overview: The Backup User Selection interface allows you to exclude user accounts from your...
Restore a Full Backup/cpmove File
Overview: Warning: We removed this interface in cPanel & WHM version 90. Use WHM’s...