This layer installs and configures OpenShift API for Data Protection (OADP) for backing up and restoring user workloads on ROSA clusters.
ROSA is a managed service where Red Hat and AWS handle platform operations. OADP on ROSA is designed for user application data, not platform components.
- Application deployments, services, configmaps, secrets
- Persistent volume data (via CSI snapshots)
- Custom resources and operators you install
- Namespaces and RBAC you create
- Control plane (etcd, API server, controllers)
- OpenShift system operators and configurations
- Node configurations and machine sets
- Cluster infrastructure (VPC, subnets, IAM)
For the complete responsibility matrix, see:
When OADP is enabled, a nightly backup schedule is automatically created:
| Setting | Default | Description |
|---|---|---|
| Schedule | 2:00 AM UTC daily | Cron: 0 2 * * * |
| Retention | 30 days | Configurable via oadp_backup_retention_days |
| Scope | All user namespaces | Excludes openshift-*, kube-*, default |
| Method | CSI snapshots + Kopia | For PVs and filesystem data |
The nightly backup includes:
- All namespaces except OpenShift system namespaces
- All Kubernetes resources in those namespaces
- Persistent Volume data via CSI snapshots
- Secrets, ConfigMaps, and custom resources
System namespaces are automatically excluded:
openshift-*(all OpenShift system namespaces)kube-system,kube-public,kube-node-leasedefaultopenshift-adp(OADP's own namespace)openshift-gitops(ArgoCD namespace)
# Enable OADP layer
enable_layer_oadp = true
# Backup retention (applies to both S3 lifecycle and Velero TTL)
oadp_backup_retention_days = 30 # Default: 30
# Disable automatic backup schedule (OADP installed but no schedule)
# oadp_backup_retention_days = 0To modify the backup behavior, edit schedule-nightly.yaml.tftpl:
Change schedule time:
spec:
# Run at 4:00 AM UTC instead of 2:00 AM
schedule: "0 4 * * *"Back up specific namespaces only:
spec:
template:
includedNamespaces:
- my-app-prod
- my-app-staging
excludedNamespaces: [] # Clear exclusionsExclude additional namespaces:
spec:
template:
excludedNamespaces:
- openshift-*
- kube-*
- my-test-namespace # Add your exclusion# Backup a specific namespace
oc create -f - <<EOF
apiVersion: velero.io/v1
kind: Backup
metadata:
name: manual-backup-$(date +%Y%m%d-%H%M)
namespace: openshift-adp
spec:
includedNamespaces:
- my-application
ttl: 720h # 30 days
storageLocation: rosa-dpa-1
EOF# List all backups
oc get backups -n openshift-adp
# Describe a specific backup
oc describe backup <backup-name> -n openshift-adp
# Check backup logs
oc logs -n openshift-adp -l velero.io/backup-name=<backup-name># List available backups
oc get backups -n openshift-adp
# Create a restore
oc create -f - <<EOF
apiVersion: velero.io/v1
kind: Restore
metadata:
name: restore-$(date +%Y%m%d-%H%M)
namespace: openshift-adp
spec:
backupName: <backup-name>
includedNamespaces:
- my-application
restorePVs: true
EOF
# Monitor restore progress
oc get restore -n openshift-adp -wTerraform creates an S3 bucket with:
- Versioning enabled
- Server-side encryption (KMS or AES256)
- Public access blocked
- Lifecycle rules matching retention period
An IAM role with OIDC trust is created for:
- S3 read/write access
- EC2 snapshot operations
- Scoped to OADP service accounts only
# Verify operator is running
oc get csv -n openshift-adp | grep oadp
# Check DPA status
oc get dataprotectionapplication -n openshift-adp
# Verify backup location is available
oc get backupstoragelocations -n openshift-adp# Check cloud-credentials secret exists
oc get secret cloud-credentials -n openshift-adp
# Verify IAM role ARN in DPA
oc get dpa rosa-dpa -n openshift-adp -o yaml | grep -A5 credential# Check schedule exists
oc get schedules -n openshift-adp
# Verify schedule is enabled
oc describe schedule nightly-user-backup -n openshift-adp