Supervising R1Soft with WHM/cPanel

Last modified date

At Serversaurus, we use R1Soft’s Continuous Data Protection (CPD) product to take 4x daily incremental backups, which allows our cPanel business clients to restore files from any point in time directly from cPanel. It has a low footprint (to the point that sub-hourly backups are viable), is disk-space efficient and affordable.

Unfortunately, the CDP agent can occasionally crash, and won’t come back on its own without external supervision (upstart, systemd, runit, etc).

WHM does come with its own process supervisor, chkservd, but its invocations are a bit magical.

The key to getting chksrvd to supervise is to drop a service definition in /etc/chkservd.d/cdp-agent:

service[cdp-agent]=x,x,x,/etc/init.d/cdp-agent restart,cdp,root

and to enable it in /etc/chkservd.conf:

cdp-agent:1

Once done, just restart the chkservd with /scripts/restartsrv_chkservd.

Automate Deployment

Doing this manually can be a bit painful once you have more than a handful of WHM/cPanel servers, so we’ve put together an Ansible role that can do it for you – https://galaxy.ansible.com/list#/roles/4106.

Ansible is definitely a handy tool if you want to be able to perform ad-hoc management actions, or make selective configuration changes to otherwise monolithic systems like WHM/cPanel. The ability to gently grow the configuration management approach on a larger fleet of existing systems is definitely somewhere that Ansible outshines the previous generation of tools, such as Chef and Puppet.