Killing cPanel Backups via Command Line / Shell

Server Maintenance | Updated 2026

When a cPanel backup process hangs or runs too long, it can consume significant disk I/O and CPU, impacting server performance. This guide shows how to identify and kill stuck backup processes from the command line.

Quick Kill
# Find backup PIDs
ps aux | grep -E '(cpbackup|backup|pkgacct)' | grep -v grep

# Kill all backup processes
killall cpbackup 2>/dev/null
kill $(pgrep -f pkgacct) 2>/dev/null

01. Identify Running Backup Processes

cPanel backups involve several processes. Check for all of them:

# cPanel backup daemon
ps aux | grep cpbackup | grep -v grep

# Individual account packaging
ps aux | grep pkgacct | grep -v grep

# Compression processes (often the bottleneck)
ps aux | grep -E '(gzip|pigz|bzip2)' | grep -v grep

# MySQL dumps
ps aux | grep mysqldump | grep -v grep

Check how long the backup has been running:

ps -eo pid,etime,cmd | grep -E '(cpbackup|pkgacct)' | grep -v grep
Check Backup Logs

Before killing, check what account is being backed up:

tail -20 /usr/local/cpanel/logs/cpbackup/*

02. Kill the Backup Process

Kill in this order to clean up properly:

  1. Kill child processes first (mysqldump, gzip, tar):
    kill $(pgrep -f pkgacct)
    kill $(pgrep -f "mysqldump.*--routines")
  2. Kill the parent backup process:
    killall cpbackup
  3. If processes refuse to die, use SIGKILL:
    kill -9 $(pgrep -f cpbackup)
    kill -9 $(pgrep -f pkgacct)
  4. Verify everything is stopped:
    ps aux | grep -E '(cpbackup|pkgacct|mysqldump)' | grep -v grep
SIGKILL as Last Resort

kill -9 does not allow the process to clean up. It can leave lock files, partial tar archives, and orphaned MySQL connections. Always try a normal kill first and wait 30 seconds before escalating to -9.

03. Clean Up Partial Backups

# Remove partial backup files (check the backup destination first)
ls -lh /backup/*/accounts/
# Delete any .tar.gz files with today's date that are incomplete

# Remove lock files
rm -f /var/cpanel/backups/*.lock

# Check disk space recovered
df -h /backup

04. Preventing Stuck Backups

  • Exclude large accounts - in WHM > Backup Configuration, exclude accounts with large mailboxes or file stores that regularly time out
  • Stagger backup times - do not run all backups at once. Use incremental backups where possible
  • Check disk space before backup runs. A full backup partition causes hangs:
    df -h /backup
  • Set backup timeout - configure maximum backup time in WHM to auto-kill hung processes
  • Monitor backup completion - check /usr/local/cpanel/logs/cpbackup/ for failures

Need Help With Backup Configuration?

If backups are consistently failing or causing performance issues, our team can help optimize your backup strategy.

Open a Support Ticket

Quick Recap

  1. Find processes: ps aux | grep cpbackup
  2. Kill children first: pkgacct, mysqldump, gzip
  3. Kill parent: killall cpbackup
  4. Clean up: remove partial archives and lock files
  5. Prevent: exclude large accounts, check disk space, stagger schedules

19,065 users found this article useful · Last updated March 2026 · Browse all Server Maintenance articles

  • 134 Users Found This Useful

Was this answer helpful?

Related Articles

Whitelisting Multiple IPs with ModSecurity

Server Maintenance | Updated March 2026 ModSecurity (our web application firewall)...

Failed to lock proc mutex: Permission denied

Server Maintenance | Updated 2026 The "failed to lock proc mutex" error in Apache's error log...

Failed to start tailwatchd - Unit tailwatchd service entered failed state

Server Maintenance | Updated 2026 The error Failed to start tailwatchd - Unit...

Disable cPanel Brute Force Command Line

Server Maintenance | Updated 2026 cPHulk is cPanel's built-in brute force protection. It...

FTP Failed: Service Check Unable to Connect to Port 21

Server Maintenance | Updated March 2026 When cPanel's service monitoring reports "FTP Failed:...



Save 30% on web hosting - Use coupon code Hosting30