Restore fails with metadata.deletionGracePeriodSeconds: Invalid value: 0: field is immutable
Article Number: 000020786
Environment
Rancher backup < 2.1.3
Situation
Restore of backup fails with error:
Error restoring namespaced resources [error restoring rancher-k3s-upgrader of type project.cattle.io/v3, Resource=apps: restoreResource: err updating resource App.project.cattle.io "rancher-k3s-upgrader" is invalid: metadata.deletionGracePeriodSeconds: Invalid value: 0: field is immutable]
Resolution
There are two ways to resolve this:
1. Upgrade to Rancher-backup 2.1.3 or higher.
2. Extract the backup archive, search for resources that have a deletingGracePeriod field. Remove these resources manually and package the archive again. You can either remove just the metadata field or remove the entire resource. It’s a resource that’s supposed to be deleted so will have no negative effects.