Retaining Backups on S3 issue
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?
-
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. 0 -
Solid solution @GOT @Gareth-AWD let us know if that works for you! 0
Please sign in to leave a comment.
Comments
2 comments