add coreutils

This commit is contained in:
2025-03-10 18:18:14 -05:00
parent 330b086da8
commit e3b944efac

View File

@@ -152,7 +152,8 @@ backup:
- | - |
s3cmd put --no-check-md5 --no-check-certificate /opt/backup/gitea-backup.zip s3://gitea-backups-8ba8dae3674a2f53354c600e/cl01tl/cl01tl-gitea-backups/gitea-backup-$(date +"%Y%m%d-%H-%M").zip; s3cmd put --no-check-md5 --no-check-certificate /opt/backup/gitea-backup.zip s3://gitea-backups-8ba8dae3674a2f53354c600e/cl01tl/cl01tl-gitea-backups/gitea-backup-$(date +"%Y%m%d-%H-%M").zip;
mv /opt/backup/gitea-backup.zip /opt/backup/gitea-backup-$(date +"%Y%m%d-%H-%M").zip; mv /opt/backup/gitea-backup.zip /opt/backup/gitea-backup-$(date +"%Y%m%d-%H-%M").zip;
s3cmd ls s3://gitea-backups-8ba8dae3674a2f53354c600e/cl01tl/cl01tl-gitea-backups/ | awk '$1 < "'$(date -d "@$(($(date +%s) - 604800))" +%Y-%m-%d\ %H:%M:%S)'" {print $4}' | while read file; do s3cmd del "s3://gitea-backups-8ba8dae3674a2f53354c600e/cl01tl/cl01tl-gitea-backups/$file"; done apk add --update coreutils
s3cmd ls s3://gitea-backups-8ba8dae3674a2f53354c600e/cl01tl/cl01tl-gitea-backups/ | awk '$1 < "'$(date -d "7 days ago" +%Y-%m-%d\ %H:%M:%S)'" {print $4}' | while read file; do s3cmd del "s3://gitea-backups-8ba8dae3674a2f53354c600e/cl01tl/cl01tl-gitea-backups/$file"; done
envFrom: envFrom:
- secretRef: - secretRef:
name: gitea-backup-s3 name: gitea-backup-s3