Skip to content

When the backup disk fills up on a cPanel server

The local JetBackup volume is at 99% and the next job is queued. How to triage, free space safely, and prevent a recurrence.

/backup is at 99% and a backup job is about to start. Deleting random snapshots to free space is tempting and dangerous — the snapshots are the only protection against the very disaster you might be inviting by hasty cleanup. There is a defensible order of operations.

What’s happening

JetBackup, R1Soft, or cpbackup all write to a backup destination. When the destination fills, new backups fail or partially write — neither is good. The triage sequence is: confirm what’s there, prune by retention policy (not by random selection), and only then think about emergency manual cleanup.

How to verify

df -h /backup
du -sh /backup/* 2>/dev/null | sort -h
jetbackup5api -F getBackupJobs
jetbackup5api -F getQueueItems --filter status=COMPLETED | head
ls -la /backup/jb/destinations/<dest>/accounts/

The du -sh /backup/* shows whether one destination is dominating. The queue items confirm whether retention has been running — if the last successful purge is older than expected, retention has been stuck.

The fix

  1. Identify whether retention has been running. journalctl -u jetbackup5d --since '7 days ago' | grep -i purge. If purge is stuck, fix that first — manually freeing space without addressing why retention didn’t is a temporary solution.
  2. Trigger manual retention: jetbackup5api -F runRetention -D '{"backup_job_id":"<id>"}'. This runs the configured retention immediately rather than waiting for the scheduled trigger.
  3. Lower retention temporarily if necessary — from 30 days to 14, for example. Change in JetBackup, then run retention. This is a real reduction in coverage; document the decision and the timeframe.
  4. Pause new backup jobs until disk pressure resolves. jetbackup5api -F disableBackupJob -D '{"_id":"<id>"}'. A backup that fails midway can leave partial snapshots that are worse than no snapshot.
  5. Long-term: add storage. The right fix for chronic backup-disk pressure is more disk or a stricter exclusion list (see the exclusion KB). Manual cleanup loops are operationally expensive.

Stack Harbor monitors backup storage and triggers proactive expansion under environment management.