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.
# 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
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:
- Kill child processes first (mysqldump, gzip, tar):
kill $(pgrep -f pkgacct) kill $(pgrep -f "mysqldump.*--routines") - Kill the parent backup process:
killall cpbackup - If processes refuse to die, use SIGKILL:
kill -9 $(pgrep -f cpbackup) kill -9 $(pgrep -f pkgacct) - Verify everything is stopped:
ps aux | grep -E '(cpbackup|pkgacct|mysqldump)' | grep -v grep
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 TicketQuick Recap
- Find processes:
ps aux | grep cpbackup - Kill children first: pkgacct, mysqldump, gzip
- Kill parent:
killall cpbackup - Clean up: remove partial archives and lock files
- 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
