Skip to content

pkgacct on a very large cPanel account — tuning the run

When a cPanel account is 100+ GB, pkgacct can run for hours. How to tune it: skipping homedir tarball compression, parallelism, and the cases where pkgacct is the wrong tool entirely.

pkgacct on a 200 GB cPanel account takes hours. The bottleneck is usually gzip compressing the home tarball, not IO or memory. Tuning helps; sometimes the right answer is to skip pkgacct entirely and use rsync or a JetBackup snapshot instead.

What’s happening

pkgacct reads the home directory, tars it, gzips it, and writes the result. The gzip step is single-threaded by default and dominates wall time on large accounts. cPanel supports flags to change the compression behavior, including using --skiphomedir to defer the home capture to a separate process (rsync) that can run in parallel.

How to verify

Before running, estimate the cost:

du -sh /home/<user>
df -h /backup
nproc

A 100 GB home on a 4-core server with single-threaded gzip will take roughly 60-90 minutes. If that’s too long, alternatives matter.

The fix

  1. Use parallel compression: pkgacct supports --compressed=pigz or similar in newer cPanel versions. pigz parallelizes gzip across CPU cores. Confirm with pkgacct --help | grep -i compress.
  2. Skip the home tarball and rsync separately. pkgacct <user> /backup --skiphomedir=1 captures everything except homedir.tar. Then rsync -a /home/<user>/ destination:/home/<user>/ for the data — uncompressed but resumable and parallel-friendly.
  3. For migration use cases, consider using JetBackup snapshot transfer instead of pkgacct. JetBackup can write to a destination on the new server directly, saving the intermediate tarball step.
  4. Use --use-backups=0 to prevent pkgacct from including the account’s JetBackup data inside the cpmove archive — that’s a common source of accidental 2x size bloat.
  5. Schedule large pkgacct runs outside backup windows. Concurrent execution with JetBackup competes for the same disk and doubles wall time.

Stack Harbor manages large-account migrations as part of migration services.