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!

Remote Backup Retention

Discussion in 'Data Protection' started by Gareth Johnstone, Dec 27, 2017.

  1. Gareth Johnstone

    Gareth Johnstone Registered

    Dec 7, 2017
    Likes Received:
    Trophy Points:
    Scottish Borders
    cPanel Access Level:
    Root Administrator
    Hi Guys,
    I currently have the following backup setup:

    • A backup is taken daily and stored in /backup
      • Backup is then sent to a remote server 'server 2' via RSYNC
      • Another copy of the backup is sent to Amazon S3
    I have a backup retention of "5 days" which is excellent for the /backup folder, however, i don't want these backups deleted from "server 2" or from Amazon s3.

    Is there anyway i can tell WHM not to delete any backups on the 2 remote locations!

    My other ideas was to turn off backup retention (if possible) and just run a script after the backup to tidy up /backup

    Any thoughts on a better method if possible?
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    There's currently no support for separate backup retention settings for each individual destination, however I encourage you to vote for the following feature request if this is something you'd like to see implemented:

    Ability to control retention for S3 Backup Destination

    The title mentions Amazon S3 destinations, but it's expanded to include any remote destination.

    As a workaround, you could set the retention period to a high number (to maintain as many copies as you need on the remote destinations), and then create a custom script that removes the local backups as part of a post backup hook:

    Guide to Standardized Hooks - Software Development Kit - cPanel Documentation
    Guide to Standardized Hooks - System Functions - Software Development Kit - cPanel Documentation

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. GeekOnTheHill

    GeekOnTheHill Member

    Feb 16, 2015
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    The ability to specify separate retention periods for /backup and each remote destination would be wonderful. I'd personally invite the devs over for dinner in return for that one.

    Until then, most storage providers do offer some sort of versioning that can be implemented, with varying degrees of awkwardness, from the remote storage side. In that case you would set local retention to "1" and let the versioning on the remote side control the retention there.


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