Diese Seite wurde maschinell übersetzt. Englisches Original lesen.

FeatureRecipe

backup-aws-backup

Component-scope FeatureRecipe for core/backup on terraform through AWS Backup: writes a backup vault, a backup plan and a selection naming the attached database's Amazon RDS DB instance, in a module of the attachment's own. It backs up an instance realized by terraform/postgres-rds, terraform/mysql-rds or terraform/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, an MSK cluster 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 its backups in its own 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.

Herkunft

OffiziellSigniert von einer Signaturidentität, die dieser Katalog als offiziellen Herausgeber anerkennt.
Inhalts-Digest
sha256:4acc82fb5a250540cb2fd25573bf79ab455505b2052640cd7264cd9b53f33ce4
Veröffentlicht
2026-11-10T10:16:40Z
Signaturidentität
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Signatur

  • Offiziellapplication/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:a1e2ce1f6cabd9945bd12eda18f9fb3ba8b4a5b15e444517523ad4c5e69950b2

Referenz zu dieser Version

oci://hub.aggrega.ai/featurerecipe/terraform/backup-aws-backup:1.0.0
Ziel
—
Implementiert
core/backup:1.0.0

Stellt bereit

Deterministische Zeigervorlagen, die dieses Rezept für Konsumenten verdrahtet.

Keine provides-Vorlagen deklariert.

Workload

Keine Workload-Vorlage deklariert.

Lokale Variablen

NameVorlage
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-Katalog -}} {{- $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-Katalog $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 -}}

Wertezuordnung

Keine Wertezuordnung deklariert.

Beziehungen

Typisierte Kanten zu und von anderen veröffentlichten Entitäten. Eine Referenz ohne veröffentlichtes Ziel wird als unterbrochene Kante statt als Link dargestellt.

Verwendet

Verwendet von

Nichts im Katalog hängt von dieser Entität ab.

Konzeptreferenz zu FeatureRecipe →

Der Aggrega-Katalog — ein offener Index von Komponenten, Funktionen, Rezepten und den Plugins, die sie rendern.

Erstellt mit dem gemeinsamen Aggrega-Designsystem.

Datenschutz