Jump to content

Backup cPanel Account before termination in WHMCS


shadowtek

Recommended Posts

You could try the PreModuleTerminate hook and use the cpanel backup API .  Unless you use a custom cpanel module or someone knows how to call the cpanel client in whmcs, you will need your own cpanel api client.  However, that API only starts a backup and provides a PID .  So, you can't terminate the account until that process finishes.  in the hook, you could return abortcmd=true, but 100% sure if that terminates the whole termination process or just that one attempt.  If just that one attempt, on each cron run it should try to cancel the account again and thus you can do a check if the backup finished and if so allow the termination to happen.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated