WHM --> Configure Backup no longer works properly.

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
We only need rolling backups of the server to be put in the /daily directory. But now after this most recent cPanel backup, our (slave) backup drive is always filling up because also the day-to-day directories are also being created, like this:

daily/
Tuesday_20091222/
Wednesday_20091223/

and so on.

The day to day directories, e.g. Tuesday_20091222, etc. are being created even though our settings in WHM ---> Configure Backup are exactly the same as before.

How can we go back to where it was, i.e. when only the daily/ directory was created and the cPanel system just did the incremental backups into this directory, without also creating the day to day directories and thereby filling up our backup drive to 100%???
 
Last edited:

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Part two:

Okay, this is strange. We've got two servers where the WHM ---> Configure Backups is configured exactly the same. One is over flowing our backup drive (see the post above) and the other is not, i.e. we only get the daily/ directory in cpbackups on the backup drive as we always have.

Here's what's also strange:

Both servers are running the exact same version of cPanel:
cPanel 11.25.0-R42399 - WHM 11.25.0 - X 3.9
REDHAT Enterprise 5.4 i686 standard

But the one that is giving us the unwanted backup copies in the day to day directories has this extra feature at the botton of the backup configuration page:

Execute Pre/Post Backup Script ---

What is going on here? Anyone?
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
part three:

Yup, I just checked all of our servers - Everywhere this option is available on the WHM ---> Backup Configuration page:

Execute Pre/Post Backup Script ---

... we have this problem.

I hate to make out all these tickets (for each of our servers with this issue) to cpanel.net support. So if anyone knows a fix for this, it would probably be helpful for all. Thanks.

By the way, if I could find the backup script and the command in the script that is making the daily directories (duplicates/redundant backups of the daily directories) I would just comment it out, but so far I am unable to find where this script is. I've looked at /scripts/cpbackup but I just don't see which line I would need to comment out to make this happen. Help, anyone?
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
The option for Pre/Post backup only shows up in the Configure Backup interface if one of the following scripts exists:

/scripts/precpbackup
/scripts/postcpbackup

Look for those scripts on the affected systems. One of them is the likely culprit for the strange directory naming. cpbackup only creates a daily directory.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
I hate to make out all these tickets (for each of our servers with this issue) to cpanel.net support. So if anyone knows a fix for this, it would probably be helpful for all. Thanks.
Please don't worry about opening tickets as this will actually help make things smoother since tickets can be used to see trends and make problems easier for us to find and ultimately lead to quicker resolutions.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
The option for Pre/Post backup only shows up in the Configure Backup interface if one of the following scripts exists:

/scripts/precpbackup
/scripts/postcpbackup

Look for those scripts on the affected systems. One of them is the likely culprit for the strange directory naming. cpbackup only creates a daily directory.
Thanks but there is no such precpbackup script to be found on the affected servers. Perhaps I am not understanding your post correctly.

CORRECTION - I did however find a postcpbackup script, and shifting this one to /root did indeed make the additional option go away on the WHM backup config page.

Okay, I think we're on to something here. This is the contents the postcpbackup script:

#!/bin/sh
/usr/bin/dowbackup.pl

And that script contains this toward the top:

# cPanel backup rotation script
# v1.2
#
# usage: /usr/bin/dowbackup.pl [Monday,Wednesday,Friday]

my %bconf;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
my @days = ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
my $today = $days[$wday];

Hopefully just removing postcpbackup will correct this issue.

Hey, thanks for your help!
 
Last edited:

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Thanks but there is no such precpbackup script to be found on the affected servers. Perhaps I am not understanding your post correctly.
On the affected system, please use the following command (via root SSH access) to verify the status of the optional cpbackup "pre" and "post" files that may be involved:
Code:
# stat /scripts/precpbackup /scripts/postcpbackup
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Thanks but there is no such precpbackup script to be found on the affected servers. Perhaps I am not understanding your post correctly.

CORRECTION - I did however find a postcpbackup script, and shifting this one to /root did indeed make the additional option go away on the WHM backup config page.

Okay, I think we're on to something here. This is the contents the postcpbackup script:

#!/bin/sh
/usr/bin/dowbackup.pl

And that script contains this toward the top:

# cPanel backup rotation script
# v1.2
#
# usage: /usr/bin/dowbackup.pl [Monday,Wednesday,Friday]

my %bconf;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
my @days = ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
my $today = $days[$wday];

Hopefully just removing postcpbackup will correct this issue.

Hey, thanks for your help!
Thank you for the updated information. I agree that removal of the customization should help to alleviate the issue. :)