Hi! I created a backup with automatic retention in CyberPanel, but retention is not working so I don’t keep backups unnecessarily. I put it to have the retention for each backup to delete the previous one. Does anyone know what can it be?
I have the same issue here. My CyberPanel version is 2.1.2 installed a couple of days before. I was facing the same issue in 2.1.1. The retention option never works, any help please?
#--------------------------------------------
echo “Emptying old backup folders…” #-------------------------------------------- #Deleting files older than 10 days #--------------------------------------------
cd /backup/allsites/
find . -mtime +10 > temp.txt
for i in cat temp.txt
do
rm -f $i
done
rm -f temp.txt #--------------------------------------------
echo “Unloaded folders are also being removed…”
find . -type d -empty -delete -maxdepth 1 #--------------------------------------------
echo “Old backups deleted.”;