GCP.GKEBackup reference
BackupChannel
Section titled “BackupChannel”Source:
src/GCP/GKEBackup/BackupChannel.ts
A Backup for GKE backup channel that authorizes storing backups in a destination project.
Changing backupChannelId, location, or destinationProject replaces
the channel. Description and labels update in place.
BackupChannel: Creating a Backup Channel
Section titled “BackupChannel: Creating a Backup Channel”Generated name
const channel = yield* GCP.GKEBackup.BackupChannel("CrossProject", { destinationProject: "projects/my-backup-project",});Explicit id, destination, and labels
const channel = yield* GCP.GKEBackup.BackupChannel("CrossProject", { backupChannelId: "app-backups", destinationProject: "projects/my-backup-project", description: "cross-project backups", labels: { env: "prod" },});BackupChannel: Updating a Backup Channel
Section titled “BackupChannel: Updating a Backup Channel”const channel = yield* GCP.GKEBackup.BackupChannel("CrossProject", { destinationProject: "projects/my-backup-project", description: "cross-project backups v2", labels: { env: "prod", team: "platform" },});BackupPlan
Section titled “BackupPlan”Source:
src/GCP/GKEBackup/BackupPlan.ts
A Backup for GKE backup plan — the configuration and schedule for a line of cluster backups.
Changing backupPlanId, location, or cluster replaces the plan.
Description, labels, retention, schedule, backup config, and
deactivated update in place.
BackupPlan: Creating a Backup Plan
Section titled “BackupPlan: Creating a Backup Plan”Generated name
const plan = yield* GCP.GKEBackup.BackupPlan("Nightly", { cluster: cluster.name, backupConfig: { allNamespaces: true },});Cron schedule and retention
const plan = yield* GCP.GKEBackup.BackupPlan("Nightly", { cluster: cluster.name, backupSchedule: { cronSchedule: "0 2 * * *" }, retentionPolicy: { backupRetainDays: 14, backupDeleteLockDays: 1 }, labels: { env: "prod" },});BackupPlan: Updating a Backup Plan
Section titled “BackupPlan: Updating a Backup Plan”const plan = yield* GCP.GKEBackup.BackupPlan("Nightly", { cluster: cluster.name, description: "nightly backups v2", labels: { env: "prod", team: "platform" },});BackupPlansBackup
Section titled “BackupPlansBackup”Source:
src/GCP/GKEBackup/BackupPlansBackup.ts
A Backup for GKE backup — a point-in-time capture of a cluster under a BackupPlan.
Changing backupId, backupPlan, or location replaces the backup.
Description, labels, deleteLockDays, and retainDays update in
place (deleteLockDays and retainDays may only increase).
BackupPlansBackup: Creating a Backup
Section titled “BackupPlansBackup: Creating a Backup”Manual backup
const backup = yield* GCP.GKEBackup.BackupPlansBackup("Nightly", { backupPlan: plan.name,});Retention overrides
const backup = yield* GCP.GKEBackup.BackupPlansBackup("Nightly", { backupPlan: plan.name, deleteLockDays: 7, retainDays: 30, description: "pre-release", labels: { env: "prod" },});BackupPlansBackup: Updating a Backup
Section titled “BackupPlansBackup: Updating a Backup”const backup = yield* GCP.GKEBackup.BackupPlansBackup("Nightly", { backupPlan: plan.name, description: "pre-release v2", labels: { env: "prod", team: "platform" },});RestoreChannel
Section titled “RestoreChannel”Source:
src/GCP/GKEBackup/RestoreChannel.ts
A Backup for GKE restore channel that authorizes restoring backups into a destination project.
Changing restoreChannelId, location, or destinationProject
replaces the channel. Description and labels update in place.
RestoreChannel: Creating a Restore Channel
Section titled “RestoreChannel: Creating a Restore Channel”Generated name
const channel = yield* GCP.GKEBackup.RestoreChannel("CrossProject", { destinationProject: "projects/my-restore-project",});Explicit id, destination, and labels
const channel = yield* GCP.GKEBackup.RestoreChannel("CrossProject", { restoreChannelId: "app-restores", destinationProject: "projects/my-restore-project", description: "cross-project restores", labels: { env: "prod" },});RestoreChannel: Updating a Restore Channel
Section titled “RestoreChannel: Updating a Restore Channel”const channel = yield* GCP.GKEBackup.RestoreChannel("CrossProject", { destinationProject: "projects/my-restore-project", description: "cross-project restores v2", labels: { env: "prod", team: "platform" },});RestorePlan
Section titled “RestorePlan”Source:
src/GCP/GKEBackup/RestorePlan.ts
A Backup for GKE restore plan — the configuration for restoring Backups from a BackupPlan into a target cluster.
Changing restorePlanId, location, cluster, or backupPlan
replaces the plan. Description, labels, and restoreConfig update in
place.
RestorePlan: Creating a Restore Plan
Section titled “RestorePlan: Creating a Restore Plan”Restore all namespaces
const plan = yield* GCP.GKEBackup.RestorePlan("Rollback", { cluster: cluster.name, backupPlan: backupPlan.name, restoreConfig: { allNamespaces: true, namespacedResourceRestoreMode: "FAIL_ON_CONFLICT", volumeDataRestorePolicy: "NO_VOLUME_DATA_RESTORATION", },});Selected namespaces
const plan = yield* GCP.GKEBackup.RestorePlan("Rollback", { cluster: cluster.name, backupPlan: backupPlan.name, restoreConfig: { selectedNamespaces: { namespaces: ["app"] }, namespacedResourceRestoreMode: "MERGE_SKIP_ON_CONFLICT", }, labels: { env: "prod" },});RestorePlan: Updating a Restore Plan
Section titled “RestorePlan: Updating a Restore Plan”const plan = yield* GCP.GKEBackup.RestorePlan("Rollback", { cluster: cluster.name, backupPlan: backupPlan.name, restoreConfig: { allNamespaces: true }, description: "rollback v2", labels: { env: "prod", team: "platform" },});RestorePlansRestore
Section titled “RestorePlansRestore”Source:
src/GCP/GKEBackup/RestorePlansRestore.ts
A Backup for GKE restore — a request to restore a Backup into the target cluster of a RestorePlan.
Changing restoreId, restorePlan, location, backup, filter,
or volumeDataRestorePolicyOverrides replaces the restore.
Description and labels update in place.
RestorePlansRestore: Creating a Restore
Section titled “RestorePlansRestore: Creating a Restore”Restore a backup
const restore = yield* GCP.GKEBackup.RestorePlansRestore("Rollback", { restorePlan: plan.name, backup: backup.name,});Filtered restore
const restore = yield* GCP.GKEBackup.RestorePlansRestore("Rollback", { restorePlan: plan.name, backup: backup.name, filter: { inclusionFilters: [{ namespace: "app" }], }, description: "app-only rollback", labels: { env: "prod" },});RestorePlansRestore: Updating a Restore
Section titled “RestorePlansRestore: Updating a Restore”const restore = yield* GCP.GKEBackup.RestorePlansRestore("Rollback", { restorePlan: plan.name, backup: backup.name, description: "app-only rollback v2", labels: { env: "prod", team: "platform" },});