Scenarios¶
The Examples page is a ladder of component manifests, one CRD capability per file. Scenarios are the layer above. Each one walks a real situation end to end, like "the cluster is gone, get my data back", and ties together the resources you apply, the kubectl commands you run, and the checks that tell you it worked.
Each scenario is backed by one 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
Repositoryis where snapshots live: an S3 bucket, a NAS, B2, and so on; - a
SnapshotPolicyis the recipe, meaning what to back up. It runs nothing on its own; - a
Snapshotis one invocation: a single snapshot as a Kubernetes object; - a
SnapshotScheduleis the cron, meaning when the recipe runs; - a
Restorereads a snapshot back into a PVC; - a
Maintenancereclaims space in the repository.
Identity is the detail that makes or breaks the recovery and migration scenarios. kopia stores each snapshot under username@hostname:path, defaulting to <policy-name>@<namespace>:/pvc/<pvcName>. To find an existing snapshot, you have to match 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 |
| 10 | DR from a replicated repository | The primary repository is gone; seed a NEW one from the surviving off-site mirror (spec.seed). |
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¶
- Getting started: the install-to-first-restore walkthrough.
- Examples: the per-capability manifest ladder.
- Backups & schedules and Restores: the field-level reference for the resources these scenarios combine.
- Troubleshooting: when a step doesn't go green.