The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to hook into precpbackup and postcpbackup under the new Backup system

Discussion in 'Data Protection' started by santrix, Jun 12, 2013.

  1. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Hi,

    We use autofs to mount an NFS share to a central backup device. We use postcpbackup and precpbackup to carry out post backup checks and to ensure the NFS share is mounted correctly before backups commence.

    I have read this post:
    http://forums.cpanel.net/f5/force-backup-run-using-new-11-38-system-343821-p2.html

    But it is anything but clear how to define/create the required hooks in the first place. I understand this area is still being documented, but in the meantime, could anyone provide a quick boilerplate how-to, in principle, to run a perl script pre and post backup, and if there is a more elegant way of killing the backup via the pre script than simply hunting down a process ID and killing it.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    An introduction and general overview of the hooks system itself can be found at:

    Hooks - Getting Started

    I will keep an eye out on our documentation and update this thread when more information on the System::Backup event is available.

    Thank you.
     
  3. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Thanks, I look forward to reading it. Do you have any estimate of when cPanel will drop support for the Legacy backup system?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    There is currently no specific time frame available on when legacy backups will be discontinued. It will not be removed without adequate notice.

    Thank you.
     

Share This Page