Backups Deleting & Retain Question

HappyPappy

Active Member
Mar 17, 2002
44
0
306
Hi,

I am using a 250GB disk mounted as "/backup" and just about to switch to the new cpanel backup system (nice, well done guys)

My backup file is about 90GB, so I have set to do backups every day but only retain two daily backups. 2 x 90 will comfortably fit in 250GB (yes, even I can do those maths)

My question is does cpanel delete the oldest daily backups directory first before it generates and retains the new daily one? If not then does this mean my backups will fail because it is trying to fit a third backups in before it deletes the older ones.

Thank you for any help.

HP
 

cPanelMichael

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

The retention function occurs after the new backup has been generated. Thus, in your scenario, the third backup would generate before the first one is removed. You may want to reduce the number of backup files retained if disk space is an issue.

Thank you.
 

HappyPappy

Active Member
Mar 17, 2002
44
0
306
Hello :)

The retention function occurs after the new backup has been generated. Thus, in your scenario, the third backup would generate before the first one is removed. You may want to reduce the number of backup files retained if disk space is an issue.

Thank you.
Thanx heaps for your answer Michael.

I think it is time for me to upgrade my backup disk to 500gb. I will be able to retain more daily backup as well.

But how cool is it to now be able to retain individual daily backups. This is a real superb move.

All good.

Thanx
 
Last edited:

HappyPappy

Active Member
Mar 17, 2002
44
0
306
Can I please add to this.

I need the system to delete the oldest backup first BEFORE it starts to generate and save a new one.

My searching has found this: https://documentation.cpanel.net/display/SDK/Guide+to+Standardized+Hooks+-+Script+Hooks

... but that is for the old backup system and is depreciated.

Can you please tell me what I can do to have the 'new' backup system delete the oldest backup first before it saves the newest one please? Do you have any inbuilt trigger or setting hidden somewhere?

Thanks for your help again.

Happy
 

HappyPappy

Active Member
Mar 17, 2002
44
0
306
Can I please add to this.

I need the system to delete the oldest backup first BEFORE it starts to generate and save a new one.

My searching has found this: https://documentation.cpanel.net/display/SDK/Guide+to+Standardized+Hooks+-+Script+Hooks

... but that is for the old backup system and is depreciated.

Can you please tell me what I can do to have the 'new' backup system delete the oldest backup first before it saves the newest one please? Do you have any inbuilt trigger or setting hidden somewhere?

Thanks for your help again.

Happy
Just to add to my own post, I see Michael says the process is ...

  • Generation of local backups
  • Transport of local backups to remote destination in queued
  • Local backups are pruned
  • Pruning of backups on the remote destination is queued

So a more accurate question would be how to achieve this process ...

  • Local backups are pruned
  • Pruning of backups on the remote destination
  • Generation of local backups
  • Transport of local backups to remote destination

Thanks for any advice anyone can give.

Happy
 

cPanelMichael

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

HappyPappy

Active Member
Mar 17, 2002
44
0
306
Thank you Michael for that.

I have trouble making a cuppa coffee let alone trying to create "hooks". Does cPanel have a custom authoring service or do you know any trusted person or organisation I could approach please?

Thank again

Happy
 

feldon27

Well-Known Member
Mar 12, 2003
136
35
178
Houston, TX
An easier solution that might be in your grasp is to write a daily cron job to nuke the old backup.