vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.55k stars 1.38k forks source link

Should restic backup emptydir #3203

Closed nevermore-muyi closed 3 years ago

nevermore-muyi commented 3 years ago

Describe the problem/challenge you have [A description of the current limitation/problem/challenge that you are experiencing.]

When i use restic to backup volume, it backups emptydir to backend.

Describe the solution you'd like [A clear and concise description of what you want to happen.]

Emptydir is ephemeral resource, so backup it may not be reasonable

https://github.com/vmware-tanzu/velero/blob/main/pkg/restic/common.go#L171

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

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.

nrb commented 3 years ago

@nevermore-muyi While technically you're right, emptyDirs are supposed to be completely ephemeral, we've found that some users do keep critical workload files in these directories, so we'll continue to back these up for now.

guanxingfeng commented 3 years ago

Is it better to make emptyDir a configurable item in backup?

navilg commented 1 year ago

Some time when emptyDir is defined in Volumes section of pod but not mounted on pod (not defined in volume mount section). It partially fails to backup. I am using velero 1.6.2. Has this been fixed in any velero version? @Lyndon-Li