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

santrix

Well-Known Member
Nov 30, 2008
225
2
68
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
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.
 

santrix

Well-Known Member
Nov 30, 2008
225
2
68
Thanks, I look forward to reading it. Do you have any estimate of when cPanel will drop support for the Legacy backup system?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Thanks, I look forward to reading it. Do you have any estimate of when cPanel will drop support for the Legacy backup system?
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.