Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Retaining Backups on S3 issue

Discussion in 'Data Protection' started by Gareth-AWD, May 17, 2019.

  1. Gareth-AWD

    Gareth-AWD Well-Known Member

    Joined:
    Jul 3, 2008
    Messages:
    188
    Likes Received:
    6
    Trophy Points:
    68
    Location:
    London, UK
    cPanel Access Level:
    Root Administrator
    I have an issue with S3 backups.

    I'm running S3 and setting cPanel to retain backups for 3 days. However, I only want that to apply locally. My trouble is it's deleting them off my Amazon S3 after 3 days. I have my own delete policies set up on S3.

    I found out with S3 transitioning to Glacier and then cPanel deleting my Glacier backups resulting in an early deletion charge.

    Is there any way to stop it deleting my S3 backups while keeping my local HD backups?
     
  2. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,454
    Likes Received:
    178
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    This would not be possible using the cpanel integrated system, however if you goal is to keep fewer local copies than on S3 there is something you can do.

    I know you must be using compressed backups and not incremental but I want to point out that this method will not work for incremental backups.

    This also assumes you want to keep X days on S3 and Y days locally. And that there are not separate weekly and monthly backups.

    What you can do is set the cpanel backup system to keep X number of days you want to store on S3.

    Then set a cron job to delete files older than Y days locally which would look like this

    find /pathtobackups - type f -mtime +Y -delete

    That will find and delete files older than the number of days you want to keep from local storage.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelLauren likes this.
  3. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,124
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice