EKS Backup with AWS Backup: What Is Saved, How to Configure It, and Every Restore Type
AWS Backup can back up an Amazon EKS cluster as one unit: the Kubernetes objects (Deployments, StatefulSets, ConfigMaps, Secrets, PVCs, CRDs, RBAC) and the EBS, EFS and S3 storage behind its persistent volumes. There is no agent and no add-on to install, unlike Velero. A restore can bring back the whole cluster, a few namespaces, only the manifests, or a single volume.
Everything below was run in us-east-1 on an existing cluster: EKS 1.35 (platform eks.29), a managed node group of five nodes, and the EBS CSI driver add-on v1.68.1-eksbuild.1. A test namespace with a StatefulSet on EBS was backed up, deleted and restored. The AWS calls were made through the AWS Backup and EC2 APIs; the CLI commands shown are the same calls.
What Is Behind an EKS Backup
One backup job creates a composite recovery point with one child per component:
| Child | CompositeMemberIdentifier |
What it is | Size in the test |
|---|---|---|---|
| Cluster state | eks-cluster-backup |
Kubernetes manifests plus the cluster configuration, stored in the vault | 6,299,198 bytes |
| Persistent volume | pvc-de9c839b-9f77-4cdd-85bd-084b1de426bb (the PV name) |
An EBS snapshot (snap-0ad7624bb28a7709e) |
1 GiB volume |
The cluster-state child records what a restore needs. Its restore metadata (GetRecoveryPointRestoreMetadata) held:
- the cluster role, VPC, subnets and Kubernetes version (
"eksClusterVersion":"1.35","controlPlaneScalingTier":"standard"), - the node group with its launch template:
[{"nodeGroupId":"demo-cluster-node-group",...,"launchTemplateId":"lt-0123456789abcdef0","launchTemplateVersion":"2"}], - every namespace in the cluster (11 here),
- which volumes belong to which namespace:
{"backup-demo":["arn:aws:ec2:us-east-1:123456789012:volume/vol-0b2dbc9d72a33adf3"]}.
The EBS snapshot keeps the CSI driver’s tags (kubernetes.io/created-for/pvc/name: data-db-0, kubernetes.io/created-for/pvc/namespace: backup-demo, ebs.csi.aws.com/cluster: true) and the description This snapshot is created by the AWS Backup service.
Not in the backup: nodes, events, leases, Endpoints and EndpointSlices, CSINodes and VolumeAttachments (recreated by Kubernetes), container images, and AWS infrastructure such as the VPC. EBS, EFS and S3 children are incremental; the cluster state is a full copy each time.
Prerequisites
- Cluster authentication mode
APIorAPI_AND_CONFIG_MAP. AWS Backup reaches the Kubernetes API through an access entry; a cluster onCONFIG_MAPonly can’t be backed up. - EKS enabled for AWS Backup in the Region (
DescribeRegionSettings→"EKS": true). - An IAM role for AWS Backup with
AWSBackupServiceRolePolicyForBackupandAWSBackupServiceRolePolicyForRestores(plus the S3 backup and restore policies if PVs use S3).AWSBackupDefaultServiceRolehad both. - An access entry for that role on the cluster, with the EKS access policy
AWSBackupFullAccessPolicyForBackupat cluster scope:
aws eks describe-access-entry --cluster-name demo-cluster \
--principal-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole
aws eks list-associated-access-policies --cluster-name demo-cluster \
--principal-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole
"associatedAccessPolicies": [{
"policyArn": "arn:aws:eks::aws:cluster-access-policy/AWSBackupFullAccessPolicyForBackup",
"accessScope": {"type": "cluster", "namespaces": []}
}]
- CSI drivers as EKS add-ons. Only volumes provisioned by the EBS, EFS or S3 (Mountpoint) CSI drivers are backed up. The docs exclude in-tree volumes and volumes under CSI migration, which includes a
gp2StorageClass with the in-tree provisionerkubernetes.io/aws-ebs(still present on this cluster).
Backing Up
On Demand
aws backup create-backup-vault --backup-vault-name eks-backup-demo
aws backup start-backup-job \
--backup-vault-name eks-backup-demo \
--resource-arn arn:aws:eks:us-east-1:123456789012:cluster/demo-cluster \
--iam-role-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole \
--lifecycle DeleteAfterDays=7
{
"BackupJobId": "6bb6e8d4-266e-4836-8eb3-007338e9bfb5",
"RecoveryPointArn": "arn:aws:backup:us-east-1:123456789012:recovery-point:composite:eks/demo-cluster-20261202121509-9451c46e",
"IsParent": true
}
The job is a parent with one child job per component:
aws backup list-backup-jobs --by-parent-job-id 6bb6e8d4-266e-4836-8eb3-007338e9bfb5
| Job | Started | Finished | Duration |
|---|---|---|---|
Parent (EKS, composite) |
12:15:09 | 12:22:42 | 7 min 33 s |
Child: cluster state (EKS) |
12:16:02 | 12:17:09 | 1 min 7 s |
| Child: EBS volume | 12:16:02 | 12:17:03 | 1 min 1 s |
Both children were COMPLETED after two minutes; the parent stayed RUNNING (composite recovery point CREATING) for five more. The EBS child was already restorable during that time.
Per the docs, a composite ends as COMPLETED, PARTIAL (a child failed, or was deleted or disassociated later) or Completed with issues (some Kubernetes objects could not be read, for example the metrics.k8s.io APIs when metrics-server is unavailable). PARTIAL also showed up below, after the children were deleted.
With a Backup Plan
aws backup create-backup-plan --backup-plan '{
"BackupPlanName": "eks-backup-demo-plan",
"Rules": [{
"RuleName": "daily-35d",
"TargetBackupVaultName": "eks-backup-demo",
"ScheduleExpression": "cron(0 3 * * ? *)",
"ScheduleExpressionTimezone": "Europe/Bucharest",
"StartWindowMinutes": 60,
"CompletionWindowMinutes": 480,
"Lifecycle": {"DeleteAfterDays": 35}
}]
}'
aws backup create-backup-selection --backup-plan-id 337edbbb-cbb3-47f3-ad7f-8b9cb82772e8 --backup-selection '{
"SelectionName": "demo-cluster",
"IamRoleArn": "arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole",
"Resources": ["arn:aws:eks:us-east-1:123456789012:cluster/demo-cluster"]
}'
The selection takes the cluster ARN (or tags on the cluster), and the backup covers the whole cluster with every supported PV in it; choosing namespaces happens at restore time. Plans, vaults, cross-Region and cross-account copies and Vault Lock work as for other resources: see AWS Backup: Plans, Vaults, Copies, Vault Lock and Restore Testing.
Restore Types
| Restore type | Metadata | Target | Tested |
|---|---|---|---|
| Whole cluster into an existing cluster | "newCluster":"false" |
Source or another existing cluster | No (would touch every namespace of a shared cluster) |
| Namespaces | "namespaceLevelRestore":"true","namespaces":"[\"ns-1\"]" (up to 5) |
Existing cluster | Yes, twice |
| Manifests only | "restoreKubernetesManifestsOnly":"true" |
Existing cluster | Yes |
| New cluster | "newCluster":"true" plus cluster role, VPC, node groups |
A cluster AWS Backup creates | No (creates a cluster and node groups) |
| One persistent volume | Restore the child recovery point (--resource-type EBS) |
A standalone EBS volume, EFS file system or S3 bucket | Yes |
All restore types are non-destructive: objects that already exist in the target are skipped, never overwritten or deleted. Cluster-scoped objects (CRDs, StorageClasses, PVs) are restored with every restore, including namespace restores. The documented default order is CRDs, Namespaces, StorageClasses, PVs, then PVCs, Secrets, ConfigMaps, ServiceAccounts, LimitRanges, Pods, ReplicaSets; kubernetesRestoreOrder overrides it.
Namespace Restore After Losing the Namespace
The test namespace was deleted (kubectl delete ns backup-demo), which also deleted its PVC, PV and EBS volume (StorageClass reclaimPolicy: Delete). Then:
aws backup start-restore-job --resource-type EKS \
--recovery-point-arn arn:aws:backup:us-east-1:123456789012:recovery-point:composite:eks/demo-cluster-20261202121509-9451c46e \
--iam-role-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole \
--metadata '{
"clusterName": "demo-cluster",
"newCluster": "false",
"namespaceLevelRestore": "true",
"namespaces": "[\"backup-demo\"]",
"nestedRestoreJobs": "{\"arn:aws:ec2:us-east-1::snapshot/snap-0ad7624bb28a7709e\":\"{\\\"AvailabilityZone\\\":\\\"us-east-1c\\\"}\"}"
}'
nestedRestoreJobs maps each storage child to its own restore metadata; an EBS volume needs the Availability Zone, and it should be the zone of the original volume (an existing node must be there to attach it).
The restore ran as a parent with two children:
| Job | Started | Finished |
|---|---|---|
| Parent | 12:35:30 | 12:44:07 (8 min 37 s) |
| EKS (cluster state) | 12:35:45 | 12:44:07 |
EBS: new volume vol-0e2722751055849cd from the snapshot |
12:37:31 | 12:38:47 |
The namespace reappeared after 7½ minutes and db-0 was running a minute later:
kubectl -n backup-demo exec db-0 -- cat /data/marker.txt
written 2026-12-02T12:14:54Z by db-0
- The data is back: the marker written before the backup, read from the new volume.
- The PV kept its name (
pvc-de9c839b-9f77-4cdd-85bd-084b1de426bb) and now points atvol-0e2722751055849cdin us-east-1c. The PVC bound to it as before. - The Service kept its ClusterIP (
172.20.188.221). - Pods are restored too: a third
webpod appeared next to the two from the restored ReplicaSet and was terminated by it seconds later. - ConfigMap and Secret values came back unchanged.
Restoring Over a Namespace That Still Exists
The same restore while backup-demo was still running:
| Job | Status | Message |
|---|---|---|
| Parent | COMPLETED |
All Kubernetes Objects failed to be restored. To get notified of these failures, enable SNS event notifications. |
| EKS child | FAILED |
same |
| EBS child | COMPLETED |
created vol-0934cb0ee8edda6ab |
Nothing in the namespace changed: same pods, same PVC, same PV. Two things to know:
- Skipped objects count as failures, and the parent still says
COMPLETED. Check the child jobs (list-restore-jobs --by-parent-job-id) and subscribe to the vault’s SNS events to see which objects were skipped. - The EBS volume is created anyway.
vol-0934cb0ee8edda6abwas attached to nothing and kept costing money until it was deleted by hand.
Manifests Only
{"clusterName":"demo-cluster","newCluster":"false","namespaceLevelRestore":"true",
"namespaces":"[\"backup-demo\"]","restoreKubernetesManifestsOnly":"true"}
Only an EKS child job ran (no EBS job), COMPLETED in 3 min 23 s with no message. The stateless part came back (web 2/2 Running), the stateful part didn’t:
persistentvolumeclaim/data-db-0 Lost pvc-de9c839b-9f77-4cdd-85bd-084b1de426bb
Warning ClaimLost persistentvolume-controller Bound claim has lost its PersistentVolume. Data on the volume is lost!
Warning FailedScheduling default-scheduler 0/5 nodes are available: persistentvolumeclaim "data-db-0" bound to non-existent persistentvolume "pvc-de9c839b-9f77-4cdd-85bd-084b1de426bb". not found
The restored PVC still names its old PV, and no PV exists. Use manifests-only when the volumes still exist (the PVs and PVCs were kept) or for stateless namespaces; otherwise delete the Lost PVC so the StatefulSet creates an empty one.
One Volume Only
A child recovery point restores on its own, here the EBS snapshot:
aws backup get-recovery-point-restore-metadata --backup-vault-name eks-backup-demo \
--recovery-point-arn arn:aws:ec2:us-east-1::snapshot/snap-0ad7624bb28a7709e
"RestoreMetadata": {"encrypted": "false", "volumeId": "vol-0b2dbc9d72a33adf3", "volumeSize": "1"}
aws backup start-restore-job --resource-type EBS \
--recovery-point-arn arn:aws:ec2:us-east-1::snapshot/snap-0ad7624bb28a7709e \
--iam-role-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole \
--metadata '{"encrypted":"false","volumeId":"vol-0b2dbc9d72a33adf3","volumeSize":"1","availabilityZone":"us-east-1c"}'
It finished in 1 min 16 s with a standalone volume, vol-0674bf95d016bb657, that no PV refers to. To read it from the cluster, give it a static PV:
apiVersion: v1
kind: PersistentVolume
metadata:
name: restored-ebs
spec:
capacity: {storage: 1Gi}
accessModes: [ReadWriteOnce]
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
csi:
driver: ebs.csi.aws.com
volumeHandle: vol-0674bf95d016bb657
fsType: ext4
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- {key: topology.kubernetes.io/zone, operator: In, values: [us-east-1c]}
A PVC with volumeName: restored-ebs and storageClassName: "" bound to it, and a pod read written 2026-12-02T12:14:54Z by db-0. This is the way to pull files out of a backup without touching the running application.
New Cluster
"newCluster":"true" makes AWS Backup create the cluster first, from the values recorded in the backup unless you override them: clusterRole, eksClusterVersion, clusterVpcConfig (subnets and security groups are required), nodeGroups (every node group from backup time, with nodeGroupId, subnetIds and nodeRole), fargateProfiles and podIdentityAssociations. The docs describe a 15-minute wait after the cluster becomes active before objects are restored. This type was not run here, since it creates a cluster and node groups. For cross-account or cross-Region restores the IAM roles (Pod Identity, IRSA), images and security groups must exist on the target side; IRSA annotations keep pointing to the source cluster’s OIDC provider.
Restored Volumes Can’t Be Deleted by the CSI Driver
Every volume AWS Backup restored here was gp2 (the original was gp3) and had no tags, although the snapshot had the CSI driver’s tags. That matters when the PV is deleted later. After the second namespace deletion, the PV stayed Released and the volume available:
Warning VolumeFailedDelete rpc error: code = Internal desc = Could not delete volume ID "vol-0e2722751055849cd": DeleteDisk could not delete volume: operation error EC2: DeleteVolume, https response error StatusCode: 403, ... api error UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:sts::123456789012:assumed-role/ebs-csi-driver-role/... is not authorized to perform: ec2:DeleteVolume on resource: arn:aws:ec2:us-east-1:123456789012:volume/vol-0e2722751055849cd because no identity-based policy allows the ec2:DeleteVolume action.
The managed AmazonEBSCSIDriverPolicy only allows ec2:DeleteVolume on volumes with one of these tags:
| Condition |
|---|
ec2:ResourceTag/ebs.csi.aws.com/cluster = true |
ec2:ResourceTag/CSIVolumeName = * |
ec2:ResourceTag/kubernetes.io/created-for/pvc/name = * |
Tagging the volume fixed it: 36 seconds after aws ec2 create-tags --resources vol-0e2722751055849cd --tags Key=ebs.csi.aws.com/cluster,Value=true, the driver’s retry deleted the volume and the PV. Tag restored volumes right after a restore, or every reclaimPolicy: Delete volume from a restore leaks when its PVC is deleted. A gp3 StorageClass doesn’t make the restored volume gp3; change it with aws ec2 modify-volume --volume-type gp3 if it matters.
Deleting Backups
aws backup delete-recovery-point --backup-vault-name eks-backup-demo \
--recovery-point-arn arn:aws:backup:us-east-1:123456789012:recovery-point:composite:eks/demo-cluster-20261202121509-9451c46e
An error occurred (InvalidRequestException) when calling the DeleteRecoveryPoint operation: Parent recovery point cannot be deleted because it has child recovery points. Disassociate or delete all child recovery points.
Delete the children first (the EBS snapshot, then the cluster-state child), and the composite after them. The docs say the cluster-state child can’t be deleted on its own; the API accepted it here, and the composite was left alone with status PARTIAL until it was deleted too. With a lifecycle (DeleteAfterDays) AWS Backup does this for you.
Notes
- Restores never overwrite. To roll a namespace back, delete it (or the objects) first, then restore.
- Check child jobs, not only the parent. A parent
COMPLETEDcan hide aFAILEDEKS child. - Restoring onto existing PVCs still creates EBS volumes. Delete the orphans.
- Restored EBS volumes are untagged gp2. Tag them
ebs.csi.aws.com/cluster=trueso the CSI driver can delete them later. - Manifests-only leaves StatefulSet PVCs
Lostif the old PVs are gone. - Plan on minutes, not seconds: about 7½ minutes for the backup of a small cluster, 8½ for a namespace restore with one volume.
- Use EKS Pod Identity over IRSA if backups may be restored into another cluster: IRSA annotations and trust policies stay tied to the source cluster’s OIDC provider.
- Cost: EBS snapshots (incremental), the cluster-state copy in the vault, and the volumes every restore creates.
Quick Reference
# Backup
aws backup start-backup-job --backup-vault-name <vault> \
--resource-arn arn:aws:eks:<region>:<account>:cluster/<cluster> \
--iam-role-arn <backup-role-arn>
aws backup list-backup-jobs --by-parent-job-id <job-id>
aws backup list-recovery-points-by-backup-vault --backup-vault-name <vault>
aws backup get-recovery-point-restore-metadata --backup-vault-name <vault> --recovery-point-arn <arn>
# Restore (composite): metadata decides the type
aws backup start-restore-job --resource-type EKS --recovery-point-arn <composite-arn> \
--iam-role-arn <backup-role-arn> --metadata '<json>'
# namespaces: "namespaceLevelRestore":"true","namespaces":"[\"ns\"]"
# manifests only: "restoreKubernetesManifestsOnly":"true"
# EBS zone: "nestedRestoreJobs":"{\"<snapshot-arn>\":\"{\\\"AvailabilityZone\\\":\\\"<az>\\\"}\"}"
# new cluster: "newCluster":"true", clusterRole, clusterVpcConfig, nodeGroups
aws backup list-restore-jobs --by-parent-job-id <restore-job-id>
# One volume
aws backup start-restore-job --resource-type EBS --recovery-point-arn <snapshot-arn> \
--iam-role-arn <backup-role-arn> --metadata '{"availabilityZone":"<az>",...}'
# After a restore: let the CSI driver manage the new volumes
aws ec2 create-tags --resources <vol-id> --tags Key=ebs.csi.aws.com/cluster,Value=true