Skip to content

Workflow: Backup and Restore

Protect and recover cluster secrets using SOPS-encrypted backups.

Creating Backups

# Backup one app
hydra gitops backup create prod.cluster-infra.cert-manager

# Backup all apps with backup-tagged refs
hydra gitops backup create 'prod.**'

Backups are stored as SOPS-encrypted YAML in the GitOps repository.

Listing Backups

hydra gitops backup list prod.cluster-infra.cert-manager

Comparing with Live State

hydra gitops backup diff prod.cluster-infra.cert-manager

Restoring

hydra gitops backup restore prod.cluster-infra.cert-manager

What to Back Up

Configure backup refs in values:

global:
  hydra:
    refs:
      - ref: "/v1/Secret/cert-manager/cert-manager-ca [backup]"

The [backup] tag marks the ref for inclusion in backup operations.

Best Practices

  • Back up before any uninstall
  • Back up before cluster upgrades
  • Commit backups to git (they're already encrypted)
  • Test restore periodically

See Also