How to manually remove service proxying for the migrated cPanel accounts manually on source server?

A service proxy configures a local service to forward requests for your cPanel account's domain to a remote server. You can use the WHM API 1 functions set_service_proxy_backends and unset_all_service_proxy_backends to manage service proxies for your cPanel account via API.

When you transfer a cPanel account from one server to another through the Live Transfer Feature in the Transfer tool, it suspends the account on the source server, redirects the service to the destination server, redirects the MX to the destination server, and also updates DNS on the destination server.

To undo Live Transfer changes, do the following on the source server:

Step 1: Unlock (Unsuspend) your account

You need to perform the below-mentioned steps to unsuspend the cPanel account.

-> Log into WHM Panel with the root user.

-> Type List Suspended account in the Search box located on the upper left side of the screen.

-> In the Suspended Accounts window, you will get the list of the suspended account.

-> Click on the Unsuspend button to unsuspend the account.

Important Note: Check the Retain Service Proxying checkbox to keep service proxying. Most users do not need to select this checkbox.

Step 2: Manually disable service proxies using the WHM API call unset_all_service_proxy_backends.

# whmapi1 unset_all_service_proxy_backends username=$username

Step 3: Remove the .htaccess dynamic content block with the following command:

# /scripts/xfertool --unblockdynamiccontent $username

Step 4: Remove manual MX redirects created by the live broadcast option. Run the following command for each domain with the live broadcast option:

# whmapi1 unset_manual_mx_redirects domain=domain.tld

Step 5: Update your DNS records to point to your source server. Point the A records for all proxy accounts to the source server. Use one of the following methods:

-> Run the swapip script with the following command, replacing $oldIP, $newIP, and $ftpIP with the appropriate IP addresses.

# cut -f1 -d":" /etc/trueuserdomains | while read x; do /usr/local/cpanel/bin/swapip $oldIP $newIP $ftpIP $x; done

-> WHM's DNS Zone Manager interface (WHM » Home » DNS Functions » DNS Zone Manager).

To disable the service proxy for all accounts on the server, run the following command:

# cut -d":" -f1 /etc/trueuserowners | while read user;do whmapi1 unset_all_service_proxy_backends username=$user;done

Disable all domains whose mail is redirected to the destination server by running the following command:

# cut -f1 -d":" /etc/manualmx | while read domain;do echo; echo "Unsetting ManualMX for $domain";echo;whmapi1 unset_manual_mx_redirects domain=$domain;done


Was this answer helpful?

« Back

chat

/* */