You know, when making changes to file in Linux servers, you are taught from day one to always make a backup of the original file.

The reason ... well, Linux has no "undo" button.

Any file mistakenly deleted is gone, kaput,  finished without any chance of retrieval.

 

With Linux servers running cPanel/CloudLinux, the rules of the game changes in favor of the Linux users.

And this is because of one of the most useful features that new versions of cPanel has: the ability for cPanel end-users and server administrators to restore individual files from an account back up.

This is made possible because of a file list that is generated and stored in the backup folder for each account when nightly account backups are taken.

Those file lists are used by the file restoration interfaces, allowing you to quickly and easily view the files available for restore.

For instance, let's say you wanted to edit a file but somehow ended up mangling it instead.

Or you realized too late that those files or folder you deleted is part of the crucial ones that holds the website together.

All you need to is to go back to cPanel, then check the Files pane for File and Directory Restoration.

This will allow you to restore items from local backup sources.

 

OK … let’s breeze through fast and see how to get this done.

To access your backups, navigate in cPanel to “File Restoration”.

If you are unable to see this option in cPanel, ask our technical support team or your server administrator to ensure that the “Backup Manager” feature has been added to your account.

Once you open that interface you are presented with the list of files in your backup.

Say you want to restore a file from your public_html folder, you would click public_html.

And from there, you can select the file that you want to restore (index.html in our case) and you are then presented with the list of dates that you can restore that file from.

Select a version to restore and you will be asked to confirm before continuing.

A confirmation message will pop up once the restore is complete!

 

How To Restore A File Or Directory (Step-By-Step)

 

cPanel File Restoration

 

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.

 

How To 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 home directory.

 

 

There are some caveats though to this.

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 your 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.

So please pay extra attention to what you are restoring.

Easy peasy, huh.

Was this answer helpful? 0 Users Found This Useful (2 Votes)