Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Excluding Ephemeral Volumes from Velero Backups #8623

Open
ayushrockzzz opened this issue Jan 16, 2025 · 2 comments
Open

Support for Excluding Ephemeral Volumes from Velero Backups #8623

ayushrockzzz opened this issue Jan 16, 2025 · 2 comments

Comments

@ayushrockzzz
Copy link

ayushrockzzz commented Jan 16, 2025

Describe the problem/challenge you have
I am trying to exclude volumes of type ephemeral from being backed up in my Velero backups. However, there is currently no direct way to specify that volumes of type ephemeral should be skipped during the backup process. These ephemeral volumes are not needed in our backup and recovery processes, and excluding them would improve backup speed and reduce storage costs.

Here is a sample pod spec that includes such an ephemeral volume:

apiVersion: v1
kind: Pod
metadata:
  name: pod_name
  namespace: default
spec:
  volumes:
    - name: ephemeral-volume
      ephemeral:
        volumeClaimTemplate:
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 16Gi

Describe the solution you'd like
I would like Velero to provide an option or resource policy to exclude volumes of kind ephemeral from backups, as they do not need to be backed up.

Anything else you would like to add:
This feature would be helpful in use cases where ephemeral volumes are created for temporary storage, logs, or cache that do not need to persist between pod restarts or cluster restarts.

Environment:

  • Velero version (use velero version): 1.15.2
  • Kubernetes version (use kubectl version): 1.30
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration: AWS EKS
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "The project would be better with this feature added"
  • 👎 for "This feature will not enhance the project in a meaningful way"
@msfrucht
Copy link
Contributor

I believe this is already supported via VolumePolicies.

https://velero.io/docs/v1.15/resource-filtering/#supported-volumepolicy-actions

# currently only supports v1 version
version: v1
volumePolicies:
- conditions:
    volumeTypes:
      - ephemeral
  action:
    type: skip

@ayushrockzzz
Copy link
Author

I believe this is already supported via VolumePolicies.

https://velero.io/docs/v1.15/resource-filtering/#supported-volumepolicy-actions

# currently only supports v1 version
version: v1
volumePolicies:
- conditions:
    volumeTypes:
      - ephemeral
  action:
    type: skip

@msfrucht, I’ve tried using this method and also attempted to annotate my PVs and PVCs with velero.io/exclude-from-backup=true, as suggested by @sseago in this discussion: #8619 (reply in thread). I upgraded to version 1.15.2, but the PVs are still being backed up. When I check the logs, there’s no indication of excluding the backup of PVs or PVCs. I’m creating backups using the velero backup create <backup-name> --include-namespaces <namespace> command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants