Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Return codes of backup

Discussion in 'cPanel Developers' started by paszczak000, Feb 7, 2016.

  1. paszczak000

    paszczak000 Active Member

    Joined:
    Nov 29, 2007
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Poland, Łódź
    Hi guys,

    I want to write Hook to run after backup is finished. I need to get status code from backup (failed or not). How can I get it using Standardized Hook.

    I want to run one command when backup is done without errors and second one when its failed.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,563
    Likes Received:
    42
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    That information is not passed to the hook scripts.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. paszczak000

    paszczak000 Active Member

    Joined:
    Nov 29, 2007
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Poland, Łódź
    So is any waf from Hook Script to check if backup failed or not? Maybe getting some details from logs?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You could develop a script that searches for specific entries in the transfer logs that identify if the transfer succeeded or failed. These documents may help:

    Review Transfers and Restores - Documentation - cPanel Documentation
    Touch File for Additional Transfer and Restore Log Diagnostic Entries - cPanel Knowledge Base - cPanel Documentation

    Keep in mind that notifications are currently configurable for the following events in "WHM Home » Server Contacts » Contact Manager":

    Backup Delayed
    Backup Failed To Finish
    Backup Failure
    Backup Successful
    Backup Transport Error


    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice