cPanel Backups

cPanel, the popular web hosting platform, has been through some updates over the years.  The latest update changed how the landing page is rendered.  AngularJS is now used for the creation of a reseller list.  The effect of this change is that any parsing done by scripts (perl, python, or otherwise) now needs to search elsewhere for that list of accounts to backup.

The goal is to have the main reseller account login with its credentials, gather a list of its accounts, and then run a backup of each individual account, sending the backup to a third-party off-site server via FTP(s).  I developed a script for a client several years ago and it has been working successfully with very little care and feeding.  The change to Angular meant some updating was needed to that script.

The ultimate fix was to login as normal and then call the list_accounts file which returns a JSON-encoded list of accounts underneath the reseller.  The fix itself was rather easy to implement because the return is JSON.  Finding the fix is, as always, an adventure.