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 TicketFrequently Asked Questions
How do I find a stuck cPanel backup process?
As root, list running backup processes with ps, for example ps aux piped to grep for cpbackup or pkgacct, to see the process IDs and how long they have run. High disk I/O or CPU from these processes is the sign a backup has hung.
How do I kill a hung cPanel backup?
Once you have the process ID, stop it with kill, and if it does not exit use kill -9 as a last resort. Kill the parent cpbackup process so its children stop too. This requires root access on a VPS or dedicated server.
Is it safe to kill a running backup?
Yes, but the backup will be incomplete, so clean up any partial backup files it left behind and let the next scheduled backup run cleanly. Killing a stuck backup is safe for your live site and data; it only abandons the in-progress archive.
How do I stop cPanel backups from hanging in the future?
Schedule backups during low-traffic hours, exclude very large or unnecessary directories, and make sure the destination has enough free space. Most stuck backups come from disk space running out or an enormous account being archived during peak load.
Quick 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 November 2026 · Browse all Server Maintenance articles
