Checklist to delete a domain

Discussion in 'Tips/Tricks/Mods' started by TonyG, Jul 8, 2022.

  1. TonyG

    TonyG Active Member

    I no longer need to support anything related to a domain. Here is my first draft of a checklist. Suggestions are welcome for improvements.

    Assumptions:
    1) This is being done by a system admin and not a Client admin. The Client is not going away, only the one domain.
    2) Ignore who should be responsible for backing up or removing their own data. The point here is just that it needs to be saved and then removed by someone.
    3) The checklist is for all services, ignore any that are not supported, or that still need to be supported.

    -----------------------------------------------------------------------------------------------
    1. Backup the site root folder.
    2. Backup the usr/vmail/domain folder.
    3. Backup all databases associated with the domain.
    4. Remove related database users
      1. Filter Databases on Website and get users from Databases
    5. Remove related databases
      1. Filter on Website
    6. Remove FTP Users
    7. Remove WebDAV Users
    8. Remove Protected Folder Users
      1. Get folder list from Protected folders
      2. Then remove the users for listed folders
    9. Remove Protected Folders
    10. Remove Shell Users
    11. Remove Cron Jobs
    12. Remove all domain/database backups from server
      1. ISPConfig backups seen in Web Domain > Backup tab
      2. Locations may depend on other backup mechanisms
    13. Remove Mailing Lists
    14. Remove spamfilter whitelist records
    15. Remove spamfilter blacklist records
    16. Remove spamfilter users
    17. Remove Postfix whitelist filters
    18. Remove Postfix whitelist filters
    19. Remove Postfix Content Filters
    20. Remove Email Forwarding rules
    21. Remove Email Catchall rules
    22. Remove Email Routing transpost records
    23. Remove Email Aliases
    24. Remove Email Mailboxes
    25. Remove Email Domain Aliases
    26. Remove Email Domain
    27. Remove Alias Domains for website
    28. Remove Subdomains for website
    29. Remove Vhost subdomains for website
    30. Remove Website
    31. Check Client and Reseller records for URLs and email addresses
      1. If site no longer exists, get a new site.
      2. If site exists elsewhere, no changes are required
    32. Remove website-related server data (Is this automated somewhere?)
      1. Remove the site clientXX/siteYY root folder.
      2. Remove site and FTP user from OS groups
      3. Remove site and FTP user, passwd
      4. Remove cron processes related to website/user
      5. Remove /home/users if they exist
    33. Remove the usr/vmail/domain folder.
    34. Do we need to manually modify fstab?
    35. Remove log files?
    36. Ensure someone has all backups
    37. Remove all backup files from server(s) (Subject to policies)
      1. Might be required for regulations, or company policies
      2. Backups might be rotated out, not requiring manual removal
    38. Remove LetsEncrypt certs
    39. Are all artifacts removed from webserver configs?
    40. Remove the DNS zone for the domain.

    -----------------------------------------------------------------------------------------------

    That's a long list of manual tasks.
    How much of this is already handled in ISPConfig?
    What steps can be eliminated?
    What else should be done?
    Thoughts?

    Thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If a client wants to keep a backup of his site and emails, he can download the backups from within ISPConfig directly. Accessing the filesystem is not needed as long as the backup function in the site is enabled for the client. The admin can use this way to get a backup too, but if the admin prefers to do it on the shell, that#s fine of course. This replaces steps 1-3 and 36.
    • To delete a website, click on the delete button of the site in the website list. This eliminates steps 4 to 12, 27 - 30, 32, 34 - 35, 37 and 39.
    • To delete a mail domain, click on the delete icon of the mail domain in the mail domain list, this eliminates steps 13 - 26, 33, and 39 from your list.
    • To delete the DNS record of a domain, click on the delete icon in the DNS zone list, removing step 40.
    • If you use domain limits module, then the admin must delete the domain in the domain list of the client in ISPConfig as well.
    This means you can reduce your list from 40 steps to 3 - 5 steps (depends on the use of domain limits module and if you are using LE certs in that site) when keeping download of a backup of his site by the client out of the list. And we might also bind the delete events for the website, email domain, and DNS to the delete event of the domain limit module (as we do it when deleting a client), this would reduce the number of steps to 1, we should probably add a feature request for this in the issue tracker if it is not there already.

    The only thing one has to do manually at the moment is to remove the LE cert, there will be an option for this in one of the next ISPConfig releases.

    So here is the new list:

    1) Click on the delete Button of the website.
    2) Click on the delete button of the email domain.
    3) Click on the delete button of the DNS zone.
    4) (Optional, only when Domain Limit module is used) Click on the Delete button of the domain in domain list of the client.
    5) Remove any associated Let's Encrypt SSL certs, if Let's Encrypt is used by that site.
     
    Planea, AlexSr, ahrasis and 1 other person like this.
  3. AlexSr

    AlexSr New Member HowtoForge Supporter

    Hi, I followed the new checklist, in my case, deleting the website didn't touch the databases, or database users. I deleted these manually. Would that be an expected behaviour?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure, as the database might be used by multiple websites or might be re-used for another site, it should not get deleted when you remove the site.
     
    Th0m likes this.

Share This Page