How to backup and restore it through WHM?

How to backup and restore it through WHM?

Many businesses are victims of cyber-attack or data breach which leads to loss in brand reputation, customer loyalty and customer trust. Because of these kinds of attacks that business loses revenue also significant business opportunities following data-loss.

Also there are reports of malicious software and hackers are everywhere these days. With all these threats like cyber attack, hackers and malware in the news these days, it is easy to overlook or another type of natural disaster can wipe out all the data in your location and make recovery more hard or impossible.

Thus if you don’t have multiple backups available, the simple act of  hard drive crash or storage device could easily result in significant data loss. If that’s not enough, you should never take for granted the very real possibility of hard drive failures and other another types of hardware mishaps.

In simple words, a data backup is just a copy of files from your computer or device and with the above mentioned threats keeping backup of your important business files and data is essential for several important reasons.

So, in this blog we are going to discuss about how to take backup of all accounts on the server and restore that backup through WHM.

The ‘Backup Configuration interface’ option allows system administrators to customize their scheduled backups. The system applies the current Backup Configuration settings to accounts that you create or transfer.

Let’s follow below steps:

Step 1- First log in to WHM home page.

Step 2 – And on there you can see ‘Backup’ tab so go into backup section. Using this interface we are going to learn how to take backup and restore backup through cPanel.

First go to ‘Backup Configuration’. A new interface will appear.

Let’s discuss the each Backup type in detail: –

  • Compressed: – Select this option to save all of your information in a compressed format. It uses less disk space but requires more time to finish.
  • Uncompressed: – Select this option to save all of your information in an uncompressed format. This setting uses more disk space but runs faster than compressed backups.
  • Incremental: – Select this setting to save all of your files in the directory tree. This setting uses a combination of hard links and files for speed and to save disk space.

Step 3 – Then we can configure it. Click ‘Enabled’ and then there are some default settings and we don’t want to change these settings.

Step 4 – The Scheduling and retention – we can choose from ‘Daily’ backups, ‘Weekly’ backups and ‘Monthly Backups’. For Daily backups select days on which we are going to take backup.

Step 5 – You can choose ‘Per account only’ or ‘Entire MySQL directory’ or ‘Per Account and Entire MySQL Directory’. I would choose ‘Per Account only’ as it is recommended.

Let’s discuss each of these Backup SQL Databases

  1. Per Account Only: –

It only back up databases for each account. It uses the setting of mysqldump utilit

2. Entire MySQL Directory: –

It backup all of the databases on the server from the /var/lib/mysql/ directory.

3. Per Account and Entire MySQL Directory: –

It performs a comprehensive backup that copies all of the databases for each individual account and all of the databases on the server.

Step 6 – So once the set up is done, click ‘Save Configuration’.

Step 7 – Success! The backup configuration is saved successfully. Now it will start taking backup as per the mentioned details.

Step 8 – As the backup has started, let’s choose a particular user for that go to ‘Backup user Selection’. A new interface will appear.

Here you can see by default all the accounts user will be activated. Enable the User which you want and disable all the other accounts thus you have enabled Domain and Backups for the particular user.

Step 9 – Go back. To restore the backup just go to ‘Backup Restoration’. A new interface will appear.

Step 10 – Once the backup is ready it will be displayed under Restoration queue table i.e. the users account, original Backup date, Status and options to clear the queue’.

Step 11- Just select the particular user and click ‘Restore’ to restore the backup. I am not going to restore the backup; we will need to perform following steps:

Step 12 – Next option is ‘Restore a full backup/CPmove file’. Full backup restore means it will restore all the files, databases, the configuration files which we have backed up So, let’s go inside this interface.

When you go in that interface you will see all the backups will be saved in anyone of the format like

  1. cpmove-{USER}
  2. cpmove-{USER}.tar
  3. cpmove-{USER}.tar.gz
  4. {USER}.tar
  5. {USER}.tar.gz
  6. backup-{MM.DD.YYYY}_{HH-MM-SS}_{USER}.tar
  7. backup-{MM.DD.YYYY}_{HH-MM-SS}_{USER}.tar.gz

Note: – If all files are stored in tar format then that file should be located at the displayed route – Server /home, /home2, /home3 ….etc. Then only it can read from that required destination and it will restore the tar files under configuration files.

In settings option – You can select transfer method :

1. Restore with username.

2. Restore with File

Let’s discuss each of these Transfer Methods:

  1. Restore with file: –

If you want this feature to work, then the backup of cpmove files must reside in one of the following directories:

  1. /home
  2. /usr/home
  3. /web
  4. /home2
  5. /home3
  6. /root
  7. /usr

You may also select a file from your local file System.

Note: – When you will restore a backup, the system expands the backup or cpmove file in its current directory, so make it clear that the file’s directory contains at least double the backup file’s space.

How to Restore a cpmove file:

Please follow the below steps:

  1. If you want to use Restricted Restore, select the ‘Restricted Restore’ checkbox. This feature performs additional security checks on the backup file in order to mitigate the risk of transfers from unfamiliar sources.
  2. This feature is also Experimental.
  3. If you do not trust the account backup with root access to your server, use this feature: Restricted Restore.
  4.  If you wish to use the Restricted Restore feature to restore an account that owns PostgreSQL databases, the target server must use PostgreSQL version 8.4 or newer.
  5. This feature will allow restored accounts to use noshell or jailshell.
  6. Select whether to restore the backup file by username or by filename
  • If you select ‘Restore with Username’: –

Select the username that is associated with the cPanel account that you wish to restore.

7. Do you want to replace all instances of the original server’s IP address with the new address or to only replace basic cPanel-provided ‘A’ records in zone files.

8. If you want to overwrite the account with data in the backup file, select the ‘Overwrite Existing User’ Checkbox.

9. Click ‘Restore’

If you select ‘Restore with file’: –

Click choose file and select the backup files from your local file system.

Step 13 – If you choose the username you have to select username for the account that you wish to restore. Then click ‘Restore’ and it will start restoring all the databases, files etc.

This option has an additional feature it will send the backup is completed message notification to the user’s registered mail id to the cPanel server.

Thus you can check when the backup was taken and at what time the backup was restored.

Visit: Hostripples!

Vishwajit Kale

Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.