Skip to content

R1Soft backup on cPanel: block-level protection you can restore

How R1Soft block-level backup works on a cPanel fleet — the agent and Server Backup Manager topology, disk-safes and recovery points, and the restore drill that proves the policy holds.

R1Soft Server Backup Manager — sold today as cPanel Backup, and still labelled Server Backup Manager inside its own interface — protects a cPanel server by reading the block device underneath the filesystem instead of walking /home file by file. On a host with millions of small files that is the difference between a backup window measured in hours and one measured in minutes, because runtime follows changed bytes rather than inode count. The cost is a second machine to keep alive, a kernel driver that has to survive every kernel update, and a restore flow your team has to rehearse. This guide covers the topology, the setup, and the drill that turns “the job says success” into evidence.

What you’ll accomplish

  • Understand where the block driver sits relative to the filesystem, and why that changes backup runtime.
  • Confirm whether an existing agent is installed, reachable, and actually talking to a Backup Manager.
  • Build or rebuild the block driver after a kernel change, including the dattobd path on newer kernels.
  • Run a full restore drill — file, account and database — with checksums as the pass criterion.
  • Decide honestly whether block-level belongs on your fleet, or whether JetBackup alone is the better answer.

Prerequisites

Root shell on the protected cPanel/WHM server, and root shell plus web-interface access on a separate machine that will run the Backup Manager. The Manager must not live on the server it protects — a host that dies takes its own backups with it. AlmaLinux 8 and 9, Rocky Linux 8 and 9, and CloudLinux 7/8/9 are the usual substrates; the agent needs gcc, make, perl and a kernel-devel package that matches the running kernel exactly, or the driver build fails at the first step.

Two driver paths exist. The historical one is R1Soft’s own kernel module, fetched or compiled by the agent’s setup script. The newer one is dattobd, the open-source block driver Datto released, which recent agent builds can use instead — and which is frequently the only path that compiles on AlmaLinux 9 kernels. Decide which you are on before you troubleshoot anything, because the failure messages look nothing alike. On CloudLinux, note that KernelCare patches the running kernel in place without changing uname -r, so the driver keeps working; a real kernel package upgrade plus a reboot does change it, and the driver must be rebuilt.

Licensing is a consideration rather than a footnote: agent licences are counted per protected machine and the Manager is licensed by edition, so a two-server estate and a forty-server estate reach different conclusions from the same technical argument.

How it works

A file-level backup — tar, pkgacct, rsync, most of what JetBackup does — asks the filesystem one question about every single file: has this changed? On a /home with four million inodes, answering that question four million times is the backup. The bytes are almost incidental; the metadata I/O is the wall.

Block-level inverts the problem. A driver loaded into the kernel sits below the filesystem and watches writes as they land on the block device, marking which blocks are dirty. When the agent runs it does not enumerate files at all — it asks the driver which blocks changed since the last run and streams those.

File-level walk of 4.2 million inodes compared with block-level dirty-block tracking

The pieces fit together like this. The agent, cdp-agent, runs on the cPanel server and listens on TCP 1167. It does not push on a schedule; the Backup Manager, cdp-server, connects out to it and pulls. On the Manager, each protected volume gets a disk-safe — a container file holding the block image plus a chain of recovery points, each one a point in time you can go back to. Retention is expressed as a recovery-point limit, and when the limit is reached the Manager merges the oldest points forward rather than deleting them outright.

cPanel agent streaming changed blocks to a Backup Manager disk-safe, with the restore path back

The restore path is what surprises people. Because the unit of storage is a block image, retrieving one file means mounting a whole recovery point read-only, browsing it, and copying out — slower and clickier than pulling one file from a JetBackup archive. Fast backups, deliberate restores. That trade is the whole product.

Step-by-step

1. Find out what is already installed. Never assume the estate is uniform. Ask the package manager and the service manager separately.

rpm -qa | grep -i serverbackup
systemctl list-units --type=service --all | grep -iE 'cdp|serverbackup'
ls /usr/sbin/r1soft/bin/

Expect a package name containing serverbackup-agent, a cdp-agent.service unit, and a bin directory of agent tools. On the Manager you see a Manager-edition serverbackup- package and cdp-server.service instead. No /usr/sbin/r1soft means nothing is installed and the rest of this section is greenfield.

2. Confirm the agent is listening and reachable. Two separate facts: the socket is open locally, and the Manager can cross the network to it.

systemctl is-active cdp-agent
ss -lntp | grep 1167

Expect active, and a listening socket on 0.0.0.0:1167 or *:1167 owned by the agent process. A socket bound only to 127.0.0.1 will never accept the Manager’s connection.

Then from the Backup Manager host, not from the cPanel server:

timeout 5 bash -c 'cat < /dev/null > /dev/tcp/<cpanel-server-ip>/1167' && echo reachable || echo blocked

Expect reachable. blocked means a firewall — on cPanel usually ConfigServer Security and Firewall. Check with csf -g 1167, or firewall-cmd --list-ports on firewalld, and open 1167 only to the Manager’s address, never to the internet.

3. Build the block driver against the running kernel. This is the step that breaks.

uname -r
rpm -q kernel-devel-$(uname -r) || dnf install -y kernel-devel-$(uname -r) gcc make perl
r1soft-setup --get-module

Expect r1soft-setup to report a module downloaded or compiled and installed successfully. A missing exact-match kernel-devel leaves the build nothing to compile against — the most common cause of a failed driver install.

4. Verify the driver is loaded. A successful build is not a loaded module.

lsmod | grep -iE 'hcpdriver|dattobd'

Expect one line naming either the R1Soft module or dattobd. Empty output means the module built but was never inserted, or the insert failed — check dmesg | tail -30 for the rejection, usually a version-magic mismatch against the running kernel.

5. Register the server on the Backup Manager and create the policy. This part is interface work, reached at https://<manager-ip>:8443 or over HTTP on 8080. Add the protected server by address, let the Manager verify the agent handshake, create a disk-safe on a volume with room to grow, then create a policy selecting the volumes you care about — normally the one holding /home and the one holding the MySQL datadir. Set the recovery-point limit to mirror the retention shape you already run elsewhere — the same daily, weekly and monthly depth as your JetBackup policy — so a restore request lands on a familiar answer regardless of which system serves it.

6. Attach a database instance to the policy. Without this, a MySQL datadir captured mid-write is crash-consistent, not application-consistent. Configure the MySQL instance on the protected server inside the policy so the agent quiesces the database around the block snapshot. Confirm the credentials work before you rely on them:

mysql --defaults-file=/root/.my.cnf -e "SHOW GRANTS FOR CURRENT_USER();"

Expect a grants list including RELOAD and SELECT at the global level — RELOAD is what permits the flush-and-lock the quiesce depends on. The distinction this protects you from is explained in application-consistent vs crash-consistent backups.

7. Run the first replication and read the log, not the status badge. Trigger the policy from the Manager, then watch from the protected side.

journalctl -u cdp-agent --since '30 min ago' --no-pager | tail -40
ls -lh /usr/sbin/r1soft/log/

Expect log lines showing a connection accepted from the Manager address and a block read pass completing. The first run is a full read of the volume and takes far longer than every run after it — draw no conclusions about ongoing runtime from it.

Validate it works

A green policy is a claim. A restore is evidence. Run this end to end on a throwaway account before you decommission anything else.

Plant a canary. On the protected server, in a test account’s home directory:

dd if=/dev/urandom of=/home/drilltest/public_html/canary.bin bs=1M count=8
sha256sum /home/drilltest/public_html/canary.bin | tee /root/canary.sha256
date -u +%FT%TZ

Expect an 8 MB file and a checksum you have written down outside the server. Note the timestamp — you will look for a recovery point later than it.

Take a recovery point, then destroy the original. Run the policy from the Manager and wait for it to complete. Then:

rm -f /home/drilltest/public_html/canary.bin
ls -l /home/drilltest/public_html/canary.bin

Expect No such file or directory. If you cannot bring yourself to delete it, you are not running a drill.

Restore to an alternate location. In the Manager, open the newest recovery point, browse to the path, and restore the file — choosing an alternate target directory rather than overwriting in place, so a bad restore cannot make the situation worse. Then verify on the protected server:

sha256sum /root/restore-drill/canary.bin
cat /root/canary.sha256

Expect the two hashes to be byte-identical. A restore that produces a file of the right size with the wrong checksum is a failed drill, not a rounding error.

Prove the database half separately. Restore the MySQL datadir from the same recovery point into a staging path, start a throwaway instance against it, and check the tables:

mysqlcheck --socket=/var/lib/mysql-drill/mysql.sock --all-databases --check

Expect OK on every table. Table is marked as crashed on a MyISAM table is exactly the signal that the quiesce in step 6 is not doing its job.

Record how long it took. Wall-clock time from “someone asked” to “checksum matched” is your real recovery time, and it is almost always longer than anyone’s estimate. The broader method lives in our backup verification and restore drill guide.

Troubleshooting

The Manager reports the agent as unreachable. Work outward. systemctl is-active cdp-agent on the protected server, then ss -lntp | grep 1167 to confirm the bind address, then the /dev/tcp probe from the Manager. If all three pass and the Manager still refuses, the agent and Manager versions are mismatched — the protocol between them is version-sensitive, and a Manager older than its agents will refuse the handshake without an obvious message. Upgrade the Manager first, then the agents, never the reverse.

The driver stops working after a kernel update. Backups that ran fine yesterday fail immediately, and lsmod shows nothing: the module was built for the old kernel and the new one rejected it. Reinstall kernel-devel for the current uname -r, re-run r1soft-setup --get-module, and confirm with lsmod and dmesg. If the R1Soft module refuses to compile on a newer kernel at all — common on AlmaLinux 9 — move that host to the dattobd path instead of fighting the build. Then fix the process: add a post-reboot module check to your configuration management, because a driver that silently stops loading gives you a fleet with weeks of missing backups and no alert saying so.

Recovery points pile up and the disk-safe volume fills. Space inside a disk-safe is reclaimed by merging older points and then compacting. If the recovery-point limit is generous while the volume is small, the disk-safe grows until the volume is full and the policy starts failing. Check the volume with df -h, lower the recovery-point limit, and run the Manager’s data-compaction task so freed extents are returned. Alert at 80 percent, not at 95.

The restored MySQL data is inconsistent. InnoDB usually recovers from a crash-consistent copy by replaying its redo log, which is why this failure is intermittent and therefore dangerous. MyISAM has no such mechanism and hands you torn tables. Attach the database instance to the policy so the snapshot is taken inside a flush-and-lock window, and for anything you cannot lose, keep a logical dump alongside the block backup — mysqldump --single-transaction --routines --triggers written to a path the block policy also captures.

Restoring one small file takes far too long. This is the design, not a fault: mounting a recovery point to retrieve a 4 KB wp-config.php is minutes of work. If small-file retrieval is a daily support request, run a file-level system next to the block-level one rather than trying to make block-level behave like something it is not.

When this is the wrong approach

Block-level earns its complexity in one shape: many machines, large volumes, and enough small files that a file-level walk cannot finish inside the window. Outside it, block-level usually loses.

A single cPanel server with a couple of hundred gigabytes in /home and ordinary file counts does not need it. JetBackup with a local plus an offsite destination is simpler to operate, restores files and accounts faster, and knows what a cPanel account is — R1Soft sees a block device and has no opinion about cpmove archives, DNS zones or reseller structure.

If your data is mostly a small number of large files, block-level buys almost nothing over an incremental file-level tool. restic or borg to object storage deduplicates well, restores individual paths directly, and costs you no kernel module at all. That driver is the real price: a component rebuilt on every kernel change, on every host, that fails closed and quietly when it is not.

And if nobody will run the restore drill, none of it matters. An unrehearsed block-level backup is not safer than an unrehearsed file-level one — it is just harder to use under pressure. Pick the system your team will practise on. cPanel’s documentation at docs.cpanel.net is the reference for how the backup tooling integrates with accounts.

If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.