Skip to content

Restore Examples

Ready-to-use Restore manifests for common scenarios. See YAML Files for downloadable .yaml files.

Full Restore (by Backup Name)

Restore everything from a backup that exists in this cluster.

apiVersion: retour.thebackup.company/v1
kind: Restore
metadata:
  name: full-restore
spec:
  backupName: my-backup
  storageBackend: s3-production

Selective Restore

Restore only specific resources from a backup.

apiVersion: retour.thebackup.company/v1
kind: Restore
metadata:
  name: selective-restore
spec:
  backupName: my-backup
  storageBackend: s3-production
  resourcesToRestore:
    - kind: Deployment
      name: webapp
      namespace: production
    - kind: PersistentVolumeClaim
      name: webapp-data
      namespace: production

Restore Single Deployment

apiVersion: retour.thebackup.company/v1
kind: Restore
metadata:
  name: webapp-only
spec:
  backupName: production-backup
  storageBackend: s3-production
  resourcesToRestore:
    - kind: Deployment
      name: webapp
      namespace: production

Restore from External Path

Use when no Backup CR exists (e.g., restoring from another cluster or after a disaster).

apiVersion: retour.thebackup.company/v1
kind: Restore
metadata:
  name: external-restore
spec:
  backupPath: /backups/2024-01-15/my-backup
  storageBackend: s3-production

Self-contained backups

Backups carry their own metadata documents on the storage backend, so a backupPath restore needs nothing else in the cluster. Point the path at the backup's directory — the status.backendPath of the original Backup CR. See Disaster Recovery.

Restore Template (No Execution)

Create a reusable restore template that can be referenced later.

apiVersion: retour.thebackup.company/v1
kind: Restore
metadata:
  name: restore-template
spec:
  isTemplate: true
  backupName: my-backup
  storageBackend: s3-production
  resourcesToRestore:
    - kind: Deployment
      name: webapp
      namespace: production
    - kind: PersistentVolumeClaim
      name: webapp-data
      namespace: production

Execute from Template

apiVersion: retour.thebackup.company/v1
kind: Restore
metadata:
  name: restore-from-template
spec:
  templateRef: restore-template

Restore Multiple Namespaces

When the backup contains multiple namespaces, restore specific ones by including their key resources.

apiVersion: retour.thebackup.company/v1
kind: Restore
metadata:
  name: multi-namespace-restore
spec:
  backupName: full-cluster-backup
  storageBackend: s3-production
  resourcesToRestore:
    - kind: Namespace
      name: production
      namespace: ""
    - kind: Deployment
      name: webapp
      namespace: production
    - kind: Deployment
      name: api
      namespace: staging