How to get checkboxes for precpbackup & postcpbackup to show in WHM?

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
On all but one of my servers I have, under Backup > Configure Backup:

Execute Pre/Post Backup Script
[x] /scripts/precpbackup
[x] /scripts/postcpbackup

On one server, those checkboxes are missing. I read somewhere that if I create /scripts/precpbackup and /scripts/postcpbackup that it will then magically show up, but after touching both files, then going back to the Configure Backup screen, those checkboxes are not there.

Further, I added some commands to /scripts/postcpbackup, and after the nightly backup last night, it did not fire (based on looking in the backup log at /usr/local/cpanel/logs/cpbackup.

Clearly I'm missing something, but I don't know what it is. Thoughts?

- Scott
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
I enabled this on a server with backups not enabled yesterday. This morning I got this note from the server:

The backup process has detected the existence of /usr/local/cpanel/scripts/precpbackup. In earlier versions of cpbackup,
this script would be executed prior to any checks or verifications and would be executed regardless of
whether the backups were up to date.

If you are certain that you would like to retain this deprecated behavior, then please edit the configuration
file /etc/cpbackup.conf and add or replace the setting for "PREBACKUP" so that the value is "-1". The following
shell command executed on the system will perform this task:

echo "PREBACKUP -1" >> /etc/cpbackup.conf

Until the configuration file is updated, the legacy behavior will be retained and you will continue to receive
this message once per day each time the backup process is executed.

Please visit /https://host.domain.com:2087/scripts/backupset to adjust your backup configuration.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
You earned the ability to retain the title of Infopro! Indeed, it was a permissions problem. The instructions I read simply said to create /scripts/postcpbackup and the magic would occur. They neglected to say that the file needed 755 permissions. As soon as I changed it, BOOM it shows up!

Thank you kind sir. I look forward to buying your first Cake Vodka in New Orleans (if you survive Germany)

- Scott
 
Last edited: