Цю сторінку перекладено машинно. Читати англійський оригінал.

FeatureRecipe

backup-aws-backup

Component-scope FeatureRecipe for core/backup on CloudFormation through AWS Backup: writes a backup vault, a backup plan and a selection naming the attached database's Amazon RDS DB instance, as a fragment assembled into its host's stack. It backs up an instance realized by cloudformation/postgres-rds, cloudformation/mysql-rds or cloudformation/mariadb-rds. Each backup is a snapshot of the instance that AWS Backup takes on infra.schedule, read in UTC and started within an hour of that time, or daily at 05:00 UTC where it is unset, and keeps in the vault for infra.retention_days days. AWS Backup keeps a continuous backup, its point-in-time recovery, only where a rule asks for one, so left out or false it keeps snapshots alone; infra.point_in_time_recovery true asks, for at most 35 days. AWS Backup runs each backup under the existing IAM role infra.role_arn names, which the attachment must set. The build halts, naming the attachment, without infra.role_arn, on a host this realization cannot name — one realized by another Recipe, or a datastore AWS Backup does not protect, such as an OpenSearch Service domain or an Amazon MQ broker — on a schedule AWS Backup cannot keep, such as one starting more than once an hour, on a retention over 36500 days, on a store connection, infra.volume or infra.credentials_secret, since AWS Backup keeps backups in its vault, on infra.run_as_user or infra.run_as_group, since it runs no job in a cluster, and on a continuous backup kept over 35 days or beside infra.keep_automated_backups false. The instance keeps its automated backups beside these, for 7 days or as long as the continuous backup, unless the attachment sets infra.keep_automated_backups to false.

Походження

ОфіційнийПідписано ідентичністю підписувача, яку цей каталог визнає офіційним видавцем.
Дайджест вмісту
sha256:54df2cd83251c310f8476ffbd8f3f2cc8fb10f26ec6c8dae04c5c21bb67a91db
Опубліковано
2026-11-10T10:14:32Z
Ідентичність підписувача
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Підпис

  • Офіційнийapplication/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:96b2a58d1173e113d47cac21ca38f831147eadf0c8cc8e7296afbbc3e71ccf99

Посилання на цю версію

oci://hub.aggrega.ai/featurerecipe/cloudformation/backup-aws-backup:1.0.0
Ціль
—
Реалізує
core/backup:1.0.0

Надає

Детерміновані шаблони вказівників, які цей рецепт під’єднує для споживачів.

Шаблонів provides не оголошено.

Workload

Шаблон робочого навантаження не оголошено.

Локальні значення

НазваШаблон
backup_name{{ printf "%s-%s" .context.instance_id .attachment_name }}
backup_schedule{{- $s := trim (toString (optional .infra "schedule" "")) -}} {{- $out := "" -}} {{- if $s -}} {{- $f := regexSplit `\s+` $s -1 -}} {{- if regexMatch `^(CRON_)?TZ=` (index $f 0) -}} {{- $out = "refuse:it names a time zone inside the expression, and AWS Backup reads this rule's expression in UTC: write the five fields alone, in UTC" -}} {{- else if ne (len $f) 5 -}} {{- $out = printf "refuse:it has %d fields where a cron expression has five, minute, hour, day of the month, month and day of the week: write the schedule as those five fields" (len $f) -}} {{- else -}} {{- $item := `^(\*|\?|[0-9]+(-[0-9]+)?)(/[0-9]+)? backup-aws-backup 1.0.0 · Каталог Aggrega -}} {{- $min := index $f 0 -}}{{- $hour := index $f 1 -}}{{- $dom := index $f 2 -}} {{- $mon := lower (index $f 3) -}}{{- $dow := lower (index $f 4) -}} {{- range $i, $n := list "jan" "feb" "mar" "apr" "may" "jun" "jul" "aug" "sep" "oct" "nov" "dec" }}{{ $mon = replace $n (toString (add1 $i)) $mon }}{{ end -}} {{- range $i, $n := list "sun" "mon" "tue" "wed" "thu" "fri" "sat" }}{{ $dow = replace $n (toString $i) $dow }}{{ end -}} {{- $badField := "" -}}{{- $badValue := "" -}} {{- range $pair := list (list "minute" $min (index $f 0)) (list "hour" $hour (index $f 1)) (list "day-of-month" $dom (index $f 2)) (list "month" $mon (index $f 3)) (list "day-of-week" $dow (index $f 4)) -}} {{- range splitList "," (index $pair 1) -}} {{- if and (not $badField) (not (regexMatch $item .)) }}{{ $badField = index $pair 0 }}{{ $badValue = index $pair 2 }}{{ end -}} {{- end -}} {{- end -}} {{- $domStar := false -}}{{- $dowStar := false -}} {{- range splitList "," $dom }}{{ $p := splitList "/" . }}{{ if and (has (index $p 0) (list "*" "?")) (or (eq (len $p) 1) (le (atoi (index $p 1)) 1)) }}{{ $domStar = true }}{{ end }}{{ end -}} {{- range splitList "," $dow }}{{ $p := splitList "/" . }}{{ if and (has (index $p 0) (list "*" "?")) (or (eq (len $p) 1) (le (atoi (index $p 1)) 1)) }}{{ $dowStar = true }}{{ end }}{{ end -}} {{- $days := list -}}{{- $dowBad := false -}} {{- if not $badField -}} {{- range splitList "," $dow -}} {{- $p := splitList "/" . -}} {{- $step := 1 -}}{{- if eq (len $p) 2 }}{{ $step = atoi (index $p 1) }}{{ end -}} {{- $lo := 0 -}}{{- $hi := 6 -}} {{- if not (has (index $p 0) (list "*" "?")) -}} {{- $lh := splitList "-" (index $p 0) -}} {{- $lo = atoi (index $lh 0) -}} {{- if eq (len $lh) 2 }}{{ $hi = atoi (index $lh 1) }}{{ else if eq (len $p) 1 }}{{ $hi = $lo }}{{ end -}} {{- end -}} {{- if or (gt $hi 6) (gt $lo $hi) (lt $step 1) }}{{ $dowBad = true }}{{ else }}{{ range untilStep $lo (int (add1 $hi)) $step }}{{ $days = append $days (toString (add1 .)) }}{{ end }}{{ end -}} {{- end -}} {{- end -}} {{- if $badField -}} {{- $out = printf "refuse:its %s field %q is not a comma list of numbers, names, ranges, steps or *, the forms a cron expression and AWS Backup both read alike: write that field in those forms" $badField $badValue -}} {{- else if not (regexMatch `^[0-9]+ backup-aws-backup 1.0.0 · Каталог Aggrega $min) -}} {{- $out = printf "refuse:its minute field %q starts a backup more than once an hour, and AWS Backup starts a snapshot backup at most once an hour: name one minute of the hour, such as 30" $min -}} {{- else if $dowBad -}} {{- $out = printf "refuse:its day-of-week field %q names a day outside 0 to 6, Sunday to Saturday, or a range running backwards: write the days from 0 for Sunday to 6 for Saturday" (index $f 4) -}} {{- else if and (not $domStar) (not $dowStar) -}} {{- $out = "refuse:it restricts both the day of the month and the day of the week, so a backup runs on a day matching either, and an AWS cron expression leaves one of the two unrestricted, so it cannot run on a day matching either: restrict one of the two fields only, and attach core/backup a second time, under another name, for the other" -}} {{- else -}} {{- $domOut := $dom -}}{{- $dowOut := "?" -}} {{- if $domStar }}{{ $domOut = "?" }}{{ $dowOut = join "," (sortAlpha (uniq $days)) }}{{ end -}} {{- if and $domStar $dowStar }}{{ $domOut = "*" }}{{ $dowOut = "?" }}{{ end -}} {{- $out = printf "cron(%s %s %s %s %s *)" $min (replace "?" "*" $hour) $domOut (replace "?" "*" $mon) $dowOut -}} {{- end -}} {{- end -}} {{- end -}} {{- $out -}}
backup_vault_id{{ capitalizedWords (printf "%s %s vault" .context.instance_id .attachment_name) }}
backup_plan_id{{ capitalizedWords (printf "%s %s plan" .context.instance_id .attachment_name) }}
backup_selection_id{{ capitalizedWords (printf "%s %s selection" .context.instance_id .attachment_name) }}

Відображення значень

Відображення значень не оголошено.

Зв’язки

Типізовані ребра до інших опублікованих сутностей і від них. Відсилання без опублікованої цілі відображається як розірване ребро, а не як посилання.

Використовує

Використовується в

Ніщо в каталозі не залежить від цієї сутності.

Довідка про поняття FeatureRecipe →

Каталог Aggrega — відкритий індекс компонентів, функцій, рецептів і плагінів, які їх рендерять.

Створено на основі спільної дизайн-системи Aggrega.

Конфіденційність