Need Backup to only create 1 folder

jetnet

Active Member
Jun 30, 2004
28
0
151
I have two servers with CPanel on there, both host about 300+ domains. Both servers are running cPanel 11.24.4-C33245 - WHM 11.24.2 - X 3.9. The older server (Server A) has been running backups now for well over a year, just like I want it to run.

(contents of cpbackup.conf)
BACKUP2 yes
BACKUPACCTS yes
BACKUPCHECK yes
BACKUPDAYS 0,1,2,3,4,5,6
BACKUPDIR /backup
BACKUPENABLE yes
BACKUPFILES yes
BACKUPFTPDIR
BACKUPFTPHOST
BACKUPFTPPASSIVE no
BACKUPFTPUSER
BACKUPINC yes
BACKUPINT daily
BACKUPLOGS no
BACKUPMOUNT no
BACKUPRETDAILY 1
BACKUPRETMONTHLY 0
BACKUPRETWEEKLY 0
BACKUPTYPE normal
DIEIFNOTMOUNTED no
GZIPRSYNCOPTS --rsyncable
MYSQLBACKUP both


It creates a folder inside /backups/ called cpbackup, and in that folder, there is a "daily" folder. That daily folder contains the user name folders. That is exactly how I need the other one to work. The other one, which has the exact same settings does this: it creates a folder in /backups/ called cpbackup, in there there are dated folders Wednesday_20090114 for example. I do NOT want that. I need one folder (cpbackup/daily) created, and I want it to nightly overwrite whatever is on the server, into that folder. I do not need daily folders of every day of the week.

Anyone have an idea how I can get the two servers to do the same thing?
 

MaestriaNick

Well-Known Member
Aug 6, 2008
159
3
68
BACKUPRETDAILY 1

change that to

BACKUPRETDAILY 0
 

jetnet

Active Member
Jun 30, 2004
28
0
151
Thank you for your reply. I will give that a shot. Do you have any idea why they are both setup the exact same way, yet one does what I want it to, and the other does not? I looked at their config file, and they are identical.

Ill post tomorrow what it does.
 

cPanelStephen

Active Member
Staff member
Aug 7, 2007
25
0
51
cpbackup would not use this naming scheme. Are either of the pre/post backup scripts present (/scripts/precpbackup || /scripts/postcpbackup)?
 

jetnet

Active Member
Jun 30, 2004
28
0
151
No, neither one of these have any check marks. Can you tell me what file or script does the backups?
 

jetnet

Active Member
Jun 30, 2004
28
0
151
I made the change you requested, and that did not solve the problem.

Once again, can anyone tell me what script is doing the backups? Which one is getting called? If I knew that, I could compare the two scripts on each server, and make sure they are the same.
 

cPanelStephen

Active Member
Staff member
Aug 7, 2007
25
0
51
Backups are performed by /scripts/cpbackup, which is called nightly by the root crontab.

If you are unable to determine why this is occurring, please open a support ticket, and we will log in and examine your setup.
 

jetnet

Active Member
Jun 30, 2004
28
0
151
I looked into both of the servers, and md5sumed both of them, and they are identical.

I started going through the script, and quickly found the problem. Although I did not specify for it to run anything out of postcpbackup, it was running it anyway. Thats where it was running this:

/usr/bin/dowbackup.pl

That script is something that we inherited when we bought the server, so removing it will take care of the problem. Thank you for pointing me in the right direction.