vmware-tanzu / velero

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

RFE: show diff when object already exists in cluster/is different from backed-up version #1948

Open ajohnstone opened 4 years ago

ajohnstone commented 4 years ago

What steps did you take and what happened: Create a backup on same cluster and restore to the same cluster produces warnings of "not restored: %s and is different from backed up version."

https://github.com/vmware-tanzu/velero/blob/v1.1.0/pkg/restore/restore.go#L1082

What did you expect to happen: No warnings to be produced and/or object to be applied. If different then at least a diff of the object in storage and clusters current resource or the resource versions to show why.

The output of the following commands will help us better understand what's going on:

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

Environment:

skriss commented 4 years ago

Currently, as a policy, Velero doesn't overwrite objects in-cluster if they already exist. We have #469 to optionally support this.

I'll update this issue to cover the feature request of showing a diff when objects are different.

joyienjoy commented 1 year ago

Currently, as a policy, Velero doesn't overwrite objects in-cluster if they already exist. We have #469 to optionally support this.

I'll update this issue to cover the feature request of showing a diff when objects are different.

With respect to the recently released version v1.1.2, has anything being implemented that solved this issue ? or Given any alternate way to apply restore forcefully even if the file is present in the cluster.