Admin

Migration Step by Step

Complete walkthrough for migrating a cPanel account to Opterius using a pkgacct backup.

Last updated 1775606400

This guide walks through a complete cPanel-to-Opterius account migration from start to finish. The process takes 15–60 minutes depending on account size and network speed between servers.

Before starting, read the cPanel Importer Overview to confirm prerequisites are met.


Step 1 — Create the pkgacct backup on the cPanel server

Log in to the cPanel/WHM server as root and run:

/scripts/pkgacct username

Replace username with the cPanel account username. The script creates an archive at:

/home/cpmove-username.tar.gz

For large accounts this may take several minutes. You can add the --skiphomedir flag to exclude home directory files if you only need databases and email, but for a full migration do not skip it.

Check the file was created:

ls -lh /home/cpmove-username.tar.gz

Step 2 — Transfer the backup to the Opterius server

From the Opterius server, pull the backup via SCP:

scp root@cpanel-server-ip:/home/cpmove-username.tar.gz /var/backups/

Or push from the cPanel server:

scp /home/cpmove-username.tar.gz root@opterius-server-ip:/var/backups/

Verify the file arrived and is not truncated:

ls -lh /var/backups/cpmove-username.tar.gz

The file size should match what you saw on the source server.


Step 3 — Open the migration importer in Opterius Panel

Log in to Opterius Panel and switch to Server Mode.

Navigate to MigrationsImport Backup.


Step 4 — Enter the backup path and parse

In the Backup File Path field, enter:

/var/backups/cpmove-username.tar.gz

Click Parse. The panel sends the path to the agent, which opens the archive and reads its contents. Parsing typically completes in a few seconds, even for large archives.


Step 5 — Review the preview

After parsing, the panel displays a summary of everything found in the archive:

  • Files — home directory size, file count
  • Databases — list of databases with row counts
  • Email accounts — list of mailboxes with Maildir sizes
  • DNS zone — all DNS records found
  • SSL certificates — expiry date, domain coverage
  • Cron jobs — all crontab entries

Review this carefully. If something is missing (for example, a database that should be there), the backup may be incomplete. Go back to the cPanel server and verify the pkgacct output.


Step 6 — Configure import options

Before starting the migration, configure:

Option What to set
Username The account username on the Opterius server. Can match the cPanel username or be different.
Package The hosting package to assign. Create the package first if needed.
Primary domain The main domain for this account.
Components Toggle which components to import — Files, Databases, Email, DNS, SSL, Cron. Uncheck any you do not want to import.

[!NOTE] If the username already exists on the Opterius server, the importer will import into that account rather than creating a new one. Existing data in the account may be overwritten depending on which components are selected.


Step 7 — Start migration and watch progress

Click Start Migration.

The panel dispatches a queue job. The queue worker (opterius-queue.service) picks it up and begins processing. Progress is shown in real time:

  • Extracting archiveImporting filesImporting databasesImporting emailImporting DNSImporting SSLImporting cron jobsComplete

You do not need to keep the browser open — the job continues in the background. Return to Server Mode → Migrations to check status.


Step 8 — Verify the migration

When status shows Complete, proceed to the verification checklist in Verifying Migration before pointing DNS at the new server.


What to do if migration fails mid-way

If the job shows Failed:

  1. Check the queue worker is running:

    systemctl status opterius-queue
    
  2. Review the agent log for the specific error:

    tail -n 100 /opt/opterius-agent/logs/agent.log
    
  3. Review the Laravel log:

    tail -n 100 /opt/opterius/storage/logs/laravel.log
    

For common failure scenarios, see Migration Troubleshooting.