Skip to content

Scenarios

The Examples page is a ladder of component manifests — one CRD capability per file. Scenarios are the layer above: end-to-end, problem- driven walkthroughs for a real situation ("the cluster is gone — get my data back"), tying several resources, the right kubectl commands, and the verification steps together.

Each scenario is backed by a single apply-ready bundle under deploy/examples/scenarios/ — copy it, replace the REPLACE_ME values, and kubectl apply -f.

The mental model (read this first if you're new)

Kopiur splits one job into separate resources so each can change independently:

  • a Repository is where snapshots live (an S3 bucket, a NAS, B2…);
  • a SnapshotPolicy is the recipewhat to back up. It runs nothing on its own;
  • a Snapshot is one invocation — a single snapshot as a Kubernetes object;
  • a SnapshotSchedule is the cronwhen the recipe runs;
  • a Restore reads a snapshot back into a PVC;
  • a Maintenance reclaims space in the repository.

The load-bearing detail in the recovery/migration scenarios is identity: kopia stores each snapshot under username@hostname:path, defaulting to <backup-config-name>@<namespace>:/pvc/<pvcName>. Resolving an existing snapshot means matching that identity. See How Kopia works.

# Scenario When you reach for it Complexity
01 Protect a stateful app Nightly, application-consistent backups of a database on a PVC. Simple
02 Recover from accidental data loss Someone deleted/corrupted data; restore the last good snapshot safely. Simple
03 Disaster recovery on a fresh cluster The cluster is gone; rebuild the app + its data from the repository. Advanced
04 Migrate an app across clusters / namespaces Move a stateful app to a new namespace or cluster, data and all. Advanced
05 Adopt an existing kopia repository You already have a kopia repo; take it over without re-uploading. Advanced
06 Backup verification / restore drills Prove backups are restorable on a schedule, and alert when one isn't. Advanced
07 Point-in-time rollback Roll a volume back to a specific known-good moment (asOf/offset). Simple
08 Clone an app into another namespace Copy prod data into staging/preview to reproduce a bug or seed an env. Advanced
09 Share one repository across clusters Several clusters back up to (or restore from) the SAME repository at once, safely. Advanced

Alpha

These use API group kopiur.home-operations.com, version v1alpha1. Backends are externally tagged (the bucket lives under backend.s3, not backend: { kind: S3 }).

See also