The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Retaining monthy backups when backup is run on a specific day...

Discussion in 'Workarounds and Optimization' started by 4u123, May 18, 2012.

  1. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    Retaining monthly backups when backup is run on a specific day...

    We want to backup a server once a week on the same day each week. This is more difficult than it looks.

    I worked out that the way the cpanel backup is designed, if I choose "Weekly" for the backup frequency, but set this only to run only on a Monday, it would not backup every week on a Monday - so the only way to get a weekly backup when a specific day of the week is enforced, is to set the "Backup Interval" to "daily" and the "days to run backup" to the day of the week I want.

    So...

    In our cpanel backup config for this server, we have the backup interval set to daily and the retention set to daily, weekly and monthly and we only run the backup on a Monday.

    This results in the expected outcome for the daily and weekly backups (they are the same), but unfortunately no monthly backup is generated at all. I want to retain three weekly backups and three monthly ones...

    I used the very handy postcpbackup script available at whmscripts.net, hoping that this would simply copy out the daily backup into a monthly directory for retention, but it doesn't.

    Can anyone suggest a workaround that would allow us to force the specific day of the week as above, but retain three weekly backups and three monthly ones? I suppose the obvious answer would be to modify the postcpbackup script, but that is beyond my level of expertise unfortunately.
     
    #1 4u123, May 18, 2012
    Last edited: May 18, 2012

Share This Page