control-panels:cpanel-whm:3-ways-to-restore-cpanel-backup-quickly-and-easily

Knowing when you need to restore a full cPanel Backup

Rest easy knowing you can replace or repair damaged files using backup copies to restore cPanel backup using the cPanel control panel interface.

Overview

There are 3 methods of restoring a cPanel backup:

Full cPanel Backup

Partial Home Directory Backup

Database Backup

The method and procedure of restoring those files might vary, depending upon the backup file type and what method you used to take the backup of those files. This article explores the different cPanel backup file types and how those backups could be restored when required, step by step.

1. How to Restore Full cPanel Backup

Before you can restore a full cPanel backup, you first must make a backup!

Regular backups, stored away from your hosting account, such as on your local machine or your backup drive is the best insurance you can have that you’ll be able to roll-back to an earlier point in time. You never know when you might face a situation where you need to restore a full cPanel backup.

When is a full cPanel backup restoration required?

There are a lot of possible scenarios where you could need to restore a full backup (and get rid of the existing state of your websites). These include: Malicious attacks and activities are great threats to server administrators. Despite the sophistication in the technologies to make servers and data more secure, sometimes the malicious activists manage to get access to unauthorized data. Upgrading and updating plugins and components of a Content Management System based website might sometimes disturb the website in such an inconvenient manner that it would be better to revert the website back to an old version instead of trying to fix it. The server failure or hard drive loss can lead to the corruption of the database and sometimes other files as well.

Best Practice: Create the backup of the full cPanel before making any major changes or upgrades to your website.

Create a backup. Download it. Store it safely. Good to go!

In case of restoration, the same downloaded backup will have to be uploaded again

Tip: Leave the most recent backup on the server PLUS download a copy of the backup just in case you might lose the original backup.

Key Points to consider before restoring full cPanel backup.

These are some very important points that you need to know before you restore the full cPanel backup:

Whenever you restore the backup files, you will lose the existing files because all the existing files are overwritten. Before you restore the full backup of the cPanel, make sure there is no data or files that could be lost due to the restoration of the backup. This could make the situation even worse for you. In case of a full cPanel backup restoration, you need to make sure that you do not have a different account on the particular server created with the same username. Because in a full cPanel restoration, the user shall be completely overwritten and all the contents of the accounts will be destroyed. The option for creating the full cPanel backup is only available for Resellers, Shared Servers, Dedicated Servers, Virtual Private Servers and Cloud Sites. The most important point to note here is that full cPanel backup could only be restored the root user for the server. So only the server administrator with the access to the root server will be able to restore the full cPanel backup.

You should use the same hosting account, to restore the full cPanel backup, that was used to create the backup, and also you should restore from the same server that was used to create the backup. This means that the account username and the primary domain used while restoring the backup should be exactly the same as those used while creating the backup. In case the username or the primary domain is not the same, some hosting services will consider it to be a migration instead of a restoration of the backup and result in problems.

The full backup includes all the files in the cPanel, the databases and emails as well. The process of creating the backup takes time, so be patient. Using cPanel, administrators provide an email address to which a system generated automated notification email is sent.

Essential Preconditions

There are certain other conditions that should be fulfilled in order to make sure that the restoration of the full cPanel backup is successful. These conditions are often referred as prerequisites of cPanel restoring. First: There are specific formats of the filename of the cPanel backup that should be used. These formats are:

cpmove–{USER} cpmove–{USER}.tar


  • cpmove–{USER}.tar.gz
  • {USER}.tar
  • {USER}.tar.gz
  • backup-{BACKUP-DATE_TIME}_{USER}.tar
  • backup-{BACKUP-DATE_TIME}_{USER}.tar.gz

The filename of the backup must be in one of the above mentioned formats.

Second: The full cPanel backup files can be restored either from the server or from the local file system of the server administrator. However, if the server administrator intends to keep the backup in the server, then there are specific locations where the backup of the cPanel must be stored in order to restore when required. These locations are:

  • /home
  • /usr/home
  • /web
  • /home2
  • /home3
  • /root
  • /usr

Third: In order to restore the backup, you will be required to log into the WHM (WebHost Manager) as root. The restoration of full cPanel backup is not possible without the WHM root access.

Compatibility

Before creating the backup of the full cPanel and restoration of that backup, server administrators also need to make sure that they completely understand the compatibility issues of the process. cPanel has made certain updates and upgrades in the system in the recent versions and the following points will make it easier for server administrators to ensure they are completely in compliance with the compatibility grid:

cPanel and WHM version 11.42 and later versions, do not restore the user’s password of MySQL and PostgreSQL database, although the actual database might be restored to the account. Server Administrators need to know this in order to avoid being locked out of the database. The user’s rights shall be refreshed and the access will be restored by the system, when the server administrator manages the database using the PhpPgAdmin or phpMyAdmin programs. Horde data is not backward compatible before cPanel and WHM version 11.50. This means Horde data can’t be restored if the backup is created using cPanel & WHM version 11.50 or later versions, and it is restored to a version prior to 11.50.

1. Step by Step Directions on How to restore full cPanel backup

Here is how the full cPanel backup can be restored:

1. Log in to the WebHost Manager as Root.

2. You will see menu on the left side on the dashboard. The click on the option “Restore a Full Backup/cpmove File”.

3. Next, two options shall be presented to you; “Restore with Username” and “Restore with File”. What you have to select out of these two depends on the location of the file you have stored.

4. If you select the “Restore with Username” option, the server shall search for the full cPanel backup in the locations mentioned in the prerequisites, i.e. /home, /usr/home, /web, and so on. You will have to use this option if you have generated and stored the full cPanel backup on any of those locations.

5. If you select the “”Restore with File” option, you will be able to manually upload the backup file from your local file system. You will have to use this option in case you downloaded the backup file to your local file system when you generated the backup.

6. Next, you will have to select one of the two options; (a) to replace all instances of the original server’s IP address with the new address, or (b) to only replace basic cPanel-provided A records in the zone files.

7. As mentioned earlier, restoration of the cPanel backup will overwrite the existing user. You will be again reminded it as a message. By marking a checkmark in the checkbox “Overwrite the existing user” you will showing your confirmation.

8. Click the “Restore” button.

9. Clicking the button shall initiate the restoration process. It is highly recommended that no process must be reinitiated, or any existing process must not be stopped while the restoration process is running.

10. Your full cPanel backup will be restored at the end of the process.

2. Partial Home Directory cPanel Backup

Creating the backup of the home directory, also known as the partial cPanel backup, and restoring the backup is an all too common occurrence. It is a recommended best practice that server administrators, with reasonable intervals, create and store the backup of their account’s website and email files. Webmasters tend to create the backups on weekly basis, monthly basis or before they make any major updates or changes to the website. Every webmaster and server administrator might have faced difficult situations in which their website might have got in such a state that the only feasible and reasonable option to fix their website would be to revert the website and the email files to a previous date, the date on which the backup was created.

When restoration of a Partial or Home Directory Backup in cPanel might be required Restoration of Partial cPanel Backup might be required when: In case you unintentionally delete any file from the home directory, you can always revert back to the old version of the website by restoring the home directory backup of the cPanel.

Similarly, in case you accidentally delete an important email that you would like to get back again, you might be able to get restore it in case you created the backup after the email was received.

Software updates and upgrades can sometimes lead to unexpected website behaviors and conditions. Things can go wrong and this situation can get serious. It is highly recommended that you take the backup of the home directory, if not the full cPanel, before you update or upgrade any software that is an important of your website.

Key points to consider before restoring home directory backup

Keep in mind that the restoration of cPanel backup overwrites the existing files. If a file exists in the backup and a file with the same name exists in the current home directory, you will be losing the current home directory file due to the restoration.

Tip: Before you restore the home directory backup, create another backup of the current home directory and store it, just in case any important file is overwritten due to the restoration. Remember, you won’t be able to restore any deleted or overwritten file of your website unless it is stored with you as a backup.

If a file existing in the current home directory does not exist in the backup, it will not be overwritten and you won’t be losing the file. Partial home directory backup restoration only overwrites the filenames that are common in the backup and the existing home directory. Same applies for emails. Any emails received after the backup was created, if they exist in the current home directory, then you won’t be losing those emails due to the restoration.

Home Directory Backup is just a Partial backup. Creating the Home Directory backup does not make a backup of:

DNS

MySQL Database

Other system files & settings that you do not own or do not have access to.

Tip: If you want to create the backup of these files as well, you can opt to generate the full cPanel backup.

Step by Step Directions on How to Restore Home Directory Backup in cPanel

Follow these steps to restore the home directory backup of the cPanel:

1. Log in to the cPanel

2. Search for the Files section

3. Click on Backups under that section

4. Look for Partial Backups

5. Then under the Restore a Home Directory Backup, find the Browse button and click on it.

6. Next, you will be able to browse the local system and select the home directory backup file from the system.

7. Select the file and click Upload

3. MySQL Database Backup in cPanel

Besides the full cPanel backup and the Partial Home Directory backup, you can also create, store and restore the backup of all MySQL Databases. The backup of the Home Directory does not include the backup of databases. It is a recommended best practice to create the backup of the MySQL database in regular intervals. In this way you can ensure you do not lose any important data.

=== Tip: Depending upon the turnover of the data in your database, you can generate and store the backup of your MySQL database on weekly basis or monthly basis. Moreover, it is very important that you create the backup before making any major update or upgrade that could involve your MySQL database. The database is one of the most integral parts of every website and the performance of all sophisticated web and mobile applications these days involve the development of a robust, normalized and neatly designed database. The loss of data from your database can lead to an extremely inconvenient situation. It can mean the loss of hours of work and money in some cases. ===

When restoration of MySQL Database in cPanel might be required

The restoration of the MySQL database backup might be required in the following situations: Server administrators sometimes accidently delete data from the database during the maintenance of the website The corruption of database can also be taken care by restoring the database backup. The corruption of the database might be caused by a bug of a third party plugin, firmware or driver. It can also be caused by an actual hardware issue. Another application of creating the backup and restoration of the MySQL database is the migration of the data from one web server to another. In that case also you will have to follow the same process. Any malicious activity or attack by hackers can also result in the loss of data in the database.

Key Points to consider before Restoration of the MySQL Database backup in cPanel The backup of MySQL database includes generating the backup of all the data in the particular database. However, this backup does not include the backup of the following:

DNS

Home Directory files

Other system files & settings that you do not own or do not have access to.

Tip: Create the backup of the Home Directory files as well when you create the backup of the MySQL database, just in case you might lose any important file of the home directory.

3. Step by Step Directions on How to restore MySQL Database backup in cPanel

Follow these steps to restore the home directory backup of the cPanel:

1. Log in to the cPanel

2. Search for the Files section

3. Click on Backups under that section

4. Look for Partial Backups

5. Then under the Restore MySQL Backup, find the Browse button and click on it.

6. Next, you will be able to browse the local system and select the home directory backup file from the system.

7. Select the file and click Upload

Note: If you’re a KnownHost.com customer – your hosting is fully managed. That means we’ll be glad to lend a hand with setting up your backups, restoring them when required, advising you on best practices, or just being around to lend a hand in case you want to undertake admin tasks and would like a wingman!

control-panels/cpanel-whm/3-ways-to-restore-cpanel-backup-quickly-and-easily.txt · Last modified: 2018/02/01 13:42 by Daniel P.