CyberPanel Community

Backup retention

da
davide #1

I setup backup for every day. Is there a way inside CP to configure backup retention?
If backup are not deleted the backup disk will be fullfilled.

4 replies
an
anisur #2

i have the same question. do you found any solution?

da
davide #3

No, still same problem in 2023.
I set 7 backup retention but old backups are not deleted.

NW
Nathan Waelkens #4

I set up a cronjob to a script containing this:

echo Emptying backups older then 14 days...

find /home/backups -type f -mtime +14
find /home/backups -type f -mtime +14 -delete

echo
echo Deleting empty folders...
find /home/backups/ -maxdepth 1 -type d -empty
find /home/backups/ -maxdepth 1 -type d -empty -delete

echo
echo Old backups deleted.

This can probably be improved, but it works and tells me exactly what it does.

St
Steve #5

Thanks for that cron script. I don’t hold much hope Backup Retention will be properly added and working anytime soon.

Sign in to reply