🚚 Move a cPanel Account Manually Without Taking a Full Backup

When migrating a cPanel account manually between servers, there may be scenarios where you want to skip the home directory backup (for example, if the /home data will be rsynced separately or is already present). This guide demonstrates how to use /scripts/pkgacct with the --skiphomedir option to package the account without the home directory, then restore it on the destination server.


βš™οΈ Environment

  • Source Server: Running cPanel
  • Target Server: Running cPanel
  • Access: Root SSH
  • OS: AlmaLinux / CloudLinux / CentOS
  • cPanel Version: 11.126 or later

🧰 Step-by-Step Instructions

πŸ›‘ 1. Disable the Account Temporarily (Optional)

Before starting, you may want to suspend the account to prevent data changes during transfer:

/scripts/suspendacct username

πŸ“¦ 2. Create a Partial Account Package (Without Home Directory)

Run the following on the source server:

/scripts/pkgacct --skiphomedir username

This creates a backup tarball in /home (or /var/cpanel/users/USERNAME/ on newer versions) excluding the home directory.

Example output file:

/home/cpmove-username.tar.gz

πŸš€ 3. Transfer the Package to the Target Server

Use rsync or scp to copy the tarball:

scp /home/cpmove-username.tar.gz root@target-server-ip:/home/

πŸ’‘ 4. (Optional) Sync Home Directory Separately

If you need to sync the home directory manually, run:

rsync -avz -e "ssh -p 22" /home/username/ root@target-server-ip:/home/username/

Ensure permissions and ownerships are preserved with -a flag.


πŸ“₯ 5. Restore the Partial Package on the Destination Server

On the target server, restore the account:

/scripts/restorepkg username

This restores:

  • DNS settings
  • MySQL databases
  • Email accounts
  • Cron jobs
  • All cPanel configs

But since --skiphomedir was used, the home directory is expected to already exist or be manually handled.


βœ… 6. Unsuspend the Account (If You Suspended It)

/scripts/unsuspendacct username

πŸ“Œ Notes

  • Ensure the destination server has the same or compatible versions of MySQL/MariaDB, PHP, and email services.
  • DNS propagation should be checked if IPs are changing.
  • You may want to update DNS zones manually or use WHM > DNS Functions > Edit DNS Zone.

πŸ§ͺ Test After Migration

After the account is restored and home directory synced:

  • Check file ownership: chown -R username:username /home/username
  • Test website, email, and database connectivity.
  • Verify permissions on public_html and other critical folders.
Scroll to Top