Knowledge Base » Blog Archive » WHM Tutorials – File and Directory Restoration – v76

WHM Tutorials – File and Directory Restoration – v76

November 21st, 2018

This video shows you how to use the File and Directory Restoration interface in WHM, for cPanel & WHM version 76.

Documentation Links:
* File and Directory Restoration in cPanel tutorial: https://youtu.be/UD_rdnVc9Vo
* How to Manage Metadata Settings document: https://go.cpanel.net/MetadataSettings
* cPanel & WHM version 76 documentation: https://documentation.cpanel.net

This article was written by Rosie Arcelay, a Technical Writer for cPanel, the Hosting Platform of choice.

Today, I will show you the File and Directory Restoration interface for cPanel & WHM version 76 (v76). You can use this interface to restore files and directories from local backups.

This interface works with metadata. To use the interface, the system must generate metadata when it runs a backup. For your system to run a backup, you must enable this functionality in the “Backup Configuration” interface in WHM.

If you want to learn more about how backups metadata works, read cPanel’s “How to Manage Metadata Settings” document. I included the link in the description.

The WHM File and Directory Restoration interface

Log in to WHM. Find the File and Directory Restoration interface. You can search for it in the search bar, or find it under the Backups section in the left menu. Then, click File and Directory Restoration to access the interface.

The accounts list will appear. Select the account that contains the items that you’d like to restore. I will select the example user for the example.com website. Then, click the View Backups button. With this action, a new interface appears. With this interface, I can retrieve the backups available for the example account.

This interface contains two sections. The Files and Directories section shows the files and directories that contain backups. To list the backups, click Show Backups. The backups will appear in the Backups section.

You can return to the account list if you selected a different account than the one that you wanted.

From this interface, you can access this account’s backups in two ways. I will show you both. You can enter a direct path to the file or directory. Or, you can browse through files and directories until you find the file that you wish to restore from a backup.

Retrieving backups through a direct path.

“Enter a path” is the default setting, so you’ll see a text box where you can enter a direct path. Your home directory already appears in the interface. Enter the path under this directory to find your backups. Since I want to retrieve the backups for the document root, I’ll enter public_html in the text box. Click Show Backups to show me the backups!

The backups now appear under the Backups section. This section tells me the directory’s name; in this case, it’s public_html. The interface shows whether the directory exists on the local disk. This information is important. If the answer is Yes, this lets me know that I’m going to overwrite the directory when I restore the backup. If the answer is No, then the directory does not exist on the local disk.

I am going to restore the public_html directory from one of these backups. I am going to select the most recent backup from this list. So I will click Restore, then click the blue Restore button, in the panel that appears, to confirm. There’s my confirmation message, so I know that the system was able to restore the backup.

Browse files or directories

Select “Browse files and directories”. This action will show you the contents of your home directory that the system has backed up. To restore the entire public_html directory, I would find its name on the list, and click “Show Backups”. This action would show all the backups for this directory. I would repeat the same actions that I showed you before to restore it.

However, this time, I want to restore one file inside the public_html directory. The file I want to restore is called test_backup.txt.

To find this file, I will return to the home directory. I will click Home, above the list. The interface will direct me back to display the contents of the Home directory.

I’m going to find public_html directory on the list and click on its name. This action shows me the contents of that directory. I will look at the directory’s contents. And, there, I see the file that I want: the test_backup.txt file. I will click Show Backups to list the file’s backups.

The backups will appear under the Backups section. I am going to select the most recent backup from this list. Notice that this file is not on the local disk. When I click Restore, the confirmation will ask me whether I want to add the file to the local disk. I want to restore that file to the local disk, so I will click the blue Restore button. The confirmation message tells me that the restoration was successful.