Halaman ini diterjemahkan oleh mesin. Baca versi asli dalam bahasa Inggris.

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.

Asal-usul

ResmiDitandatangani oleh identitas penandatangan yang diakui katalog ini sebagai penerbit resmi.
Digest konten
sha256:54df2cd83251c310f8476ffbd8f3f2cc8fb10f26ec6c8dae04c5c21bb67a91db
Dipublikasikan
2026-11-10T10:14:32Z
Identitas penandatangan
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Tanda tangan

  • Resmiapplication/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

Referensi pada versi ini

oci://hub.aggrega.ai/featurerecipe/cloudformation/backup-aws-backup:1.0.0
Target
—
Mengimplementasikan
core/backup:1.0.0

Menyediakan

Templat pointer deterministik yang dihubungkan resep ini untuk konsumen.

Tidak ada templat provides yang dideklarasikan.

Workload

Tidak ada templat beban kerja yang dideklarasikan.

Nilai lokal

NamaTemplat
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 · Katalog 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 · Katalog 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) }}

Pemetaan values

Tidak ada pemetaan values yang dideklarasikan.

Relasi

Sisi bertipe ke dan dari entitas lain yang dipublikasikan. Referensi tanpa target yang dipublikasikan ditampilkan sebagai sisi yang terputus, bukan sebagai tautan.

Menggunakan

Digunakan oleh

Tidak ada apa pun di katalog yang bergantung pada entitas ini.

Referensi konsep FeatureRecipe →

Katalog Aggrega — indeks terbuka berisi komponen, fitur, resep, dan plugin yang merendernya.

Dibangun dengan sistem desain Aggrega yang digunakan bersama.

Privasi