Backup creating two sets of backups

SamAdu

Member
May 8, 2018
7
3
3
Germany
cPanel Access Level
Root Administrator
Hello,

I have two servers that I manually run weekly backups using the backup script /usr/local/cpanel/bin/backup --force

The issue is that, every time I run the backup, it ends up creating two sets of the backups in two different directories like:

/backup/2019-03-17 and
/backup/weekly/2019-03-17

Due to this, the backup usually fails since the two backup sets use up all the available space on the drive.

How can I ensure the backup only generates a single set?


Thanks
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,772
326
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Disable the weekly backups in the backup config. If you set the daily to only run one day a week you'll end up with one backup weekly and you won't even have to run them by hand.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463

SamAdu

Member
May 8, 2018
7
3
3
Germany
cPanel Access Level
Root Administrator
Hi @cPanelMichael,

thanks for your reply. The behavior is actually different from the backup retention described in the link you added.

The backups creates two sets of the same backup run instead.

I have modified the backup configurations to what @GOT suggested but I have to wait till weekend before I can execute the backup since I can't afford the additional load the backup adds to the server on the weekdays.

I will update this thread with the outcome.

Below is the configurations file content (modified to what @GOT suggested):

Code:
[[email protected] ~]# cat /var/cpanel/backups/config
---
BACKUPACCTS: 'yes'
BACKUPBWDATA: 'no'
BACKUPDAYS: 0
BACKUPDIR: /home/1BACKUP
BACKUPENABLE: 'yes'
BACKUPFILES: 'yes'
BACKUPLOGS: 'no'
BACKUPMOUNT: 'no'
BACKUPSUSPENDEDACCTS: 'no'
BACKUPTYPE: compressed
BACKUP_DAILY_ENABLE: 'yes'
BACKUP_DAILY_RETENTION: 1
BACKUP_MONTHLY_DATES: 1
BACKUP_MONTHLY_ENABLE: 'no'
BACKUP_MONTHLY_RETENTION: 1
BACKUP_WEEKLY_DAY: 0
BACKUP_WEEKLY_ENABLE: 'no'
BACKUP_WEEKLY_RETENTION: 1
CHECK_MIN_FREE_SPACE: 1
DISABLE_METADATA: 'no'
ERRORTHRESHHOLD: 3
FORCE_PRUNE_DAILY: 1
FORCE_PRUNE_MONTHLY: 0
FORCE_PRUNE_WEEKLY: 0
GZIPRSYNCOPTS: --rsyncable
KEEPLOCAL: 1
LINKDEST: 0
LOCALZONESONLY: 'yes'
MAXIMUM_RESTORE_TIMEOUT: 21600
MAXIMUM_TIMEOUT: 7200
MIN_FREE_SPACE: 5
MIN_FREE_SPACE_UNIT: percent
MYSQLBACKUP: both
POSTBACKUP: 'no'
PREBACKUP: -1
PSQLBACKUP: 'no'
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
The behavior is actually different from the backup retention described in the link you added.

The backups creates two sets of the same backup run instead.

I have modified the backup configurations to what @GOT suggested but I have to wait till weekend before I can execute the backup since I can't afford the additional load the backup adds to the server on the weekdays.

I will update this thread with the outcome.

Below is the configurations file content (modified to what @GOT suggested):
It's normal for two copies of your backups to exist when enabling both daily and weekly backups. Now that you've disabled weekly backups, the extra copy should no longer generate (though you may want to manually delete the existing weekly backups). Let us know if you notice different results.

Thank you.
 

SamAdu

Member
May 8, 2018
7
3
3
Germany
cPanel Access Level
Root Administrator
I initially had only weekly backups enabled though but it was still creating two copies.

After disabling the weekly backups and enabling only the daily backups as initially suggested [email protected], it only generates a single backup set.

This issue is solved.

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I initially had only weekly backups enabled though but it was still creating two copies.
Can you share a screenshot of the previous backup settings you were using (without saving the previous settings) in WHM >> Backup Configuration?

Thank you.