Introduction
There may be occasions that you would like to retain an account's DNS zones when removing the account from a server. One reason would be after transferring the account to another server that uses the same DNS cluster members. If the DNS zones are removed when terminating the account on the source server, the zones will also be removed from the DNS cluster members that are also in use on the destination server. It is important to retain DNS zones when terminating accounts in this scenario.
Procedure
- When terminating accounts via WHM -> Terminate Accounts, check the 'Keep DNS Zone' box:
- When removing accounts via /usr/local/cpanel/scripts/removeacct
, pass the--keepdns
flag:
/usr/local/cpanel/scripts/removeacct $user --keepdns