This is a guest blog post provided by Kevin McGrail. Kevin is a respected member of the hosting industry, a huge supporter of the Open Source community, and an alumni speaker at the annual cPanel Conference

There are a lot of reasons to choose cPanel & WHM as your web hosting management solution. It’s got tons of features, great support and it lets everyone from Mom n’ Pop to Enterprise customers easily manage their hosting. Plus they are always adding new features, such as the WordPress Manager (really cool!). However, I’m going to focus on the ease of deploying servers with backups.

Backups are critical

We don’t consider a machine production ready without backups fully implemented and tested for restoration. cPanel makes backups incredibly simple. Login to WHM, Go to Backups->Backup Configuration->Enable Backups. From there, the GUI interface is very straightforward. The documentation is well laid out.

Of course, you need to protect yourself against a catastrophic failure with off-site backups. WHM makes this incredibly simple, with easy options for storing your backups remotely on Amazon S3, Google Drive, or a remote server via Rsync, FTP, and SFTP.

CrashPlan on a cPanel server

At PCCC, we take things even further. We also duplicate the cPanel backups offsite, which is very easy to do on a cPanel & WHM server. To accomplish this, we use Code42’s CrashPlan Pro Enterprise, but there are many options available to a webhost. If you use CrashPlan, I recommend that you configure the CrashPlan app to sweep the cPanel backup directory, to store the backups encrypted and off-site. Best of all, the app works out of the box with one minor change.

A cPanel & WHMC server uses a RAM-based temporary directory for /tmp to improve performance and they also disable execution privileges on that folder for security. Because CrashPlan uses /tmp to install updates, the added security to /tmp will cause failures when you push a new client. To fix the issue, all you need to do is create an alternate temporary directory and tell CrashPlan to use it.

First, you create the directory and give it appropriate permissions. In this example, we will use /usr/local/tmp as our new temporary directory, but this can be set to anything you’d like to use.

mkdir /usr/local/tmp

chmod 1777 /usr/local/tmp

Now make CrashPlan use this temporary directory by appending the following line to /usr/local/crashplan/bin/run.conf using your favorite command line editor.

-Djava.io.tmpdir=/usr/local/tmp " to GUI_JAVA_OPTS and SRV_JAVA_OPTS

In addition to CrashPlan, it’s super easy to add Google Drive as a Backup Destination. It’s a little complex the first time, though. I recommend you make sure you create a project, then enable the API for that project, create your OAuth Credentials and then configure the remote destination in WHM. It works very well with a free Gmail account, and the documentation is thorough!

Good backups mean good sleep

Good backups will help you sleep well at night. cPanel is still adding things, though! On our wish list for 2018 is to see different backup destinations based on the type of backup. If you’d like to see that too, definitely go vote for it on the feature request site! In the meantime, here’s wishing you Happy Hosting.

KAM

—–

by Kevin A. McGrail
Member, Asst. Treasurer, VP Fundraising & Apache SpamAssassin Chair Emeritus, Apache.org
CEO, PCCC.com