sirchick

Registered
Dec 21, 2013
2
0
1
cPanel Access Level
Website Owner
Hello,

I am really new to this and also very confused on how to do what i am trying to do.

I want to have my backup run, but before it does that run a PHP script which can update my database. I then want it to do something similar again when the back up finishes.

This way users cannot login during backup... but i ain't got a clue how this i done, i've seen some people suggest i make my own PHP script and use cpanel crons to call that and just disable cpanel's backup.

That would be alot simpler but if theres a way to do it with cpanel's backup it would save me writing an entire back up script.

I'm not using legacy back up. Please help a noob :)
 

quietFinn

Well-Known Member
Feb 4, 2006
1,894
463
438
Finland
cPanel Access Level
Root Administrator
You can run cPanel backup using command
/usr/local/cpanel/bin/backup

If you start it from your own script remove it from root's crontab.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

Your access level is listed as "Website Owner". To verify, do you have root access to the system? If so, you may want to consider using pre and post backup event hooks. Documentation on standardized hooks is available at:

Standardized Hooks

Thank you.