Skip to content

Commit

Permalink
Delete old backups
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Jan 9, 2025
1 parent 4065ee6 commit cd8b17f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backup/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ echo "Removing local backup file"
rm -rf "${BACKUP_TMP:?}"

echo "Backup completed."

if [ -n "$BACKUP_MAX_AGE" ]; then
rclone delete "$RCLONE_REMOTE" --min-age "${BACKUP_MAX_AGE:-2w}" --drive-use-trash=false --config "/tmp/rclone.conf"
fi

0 comments on commit cd8b17f

Please sign in to comment.