This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.4.7.2. 恢复 Restic 备份的 CR 是 "PartiallyFailed", "Failed",或保留 "InProgress"
Restic 备份的 Restore CR 使用 PartiallyFailed 或 Failed 状态完成,或者保持 InProgress,且不完成。
如果状态是 PartiallyFailed 或 Failed,Velero pod 日志会显示错误消息,level=error msg="unable to successfully restic restore of pod 的 volumes"。
如果状态是 InProgress,Restore CR 日志不可用,且 Restic pod 日志中不会出现任何错误。
原因
DeploymentConfig 对象重新部署 Restore pod,从而导致 Restore CR 失败。
解决方案
创建排除
ReplicationController、DeploymentConfig和TemplateInstances资源的RestoreCR:velero restore create --from-backup=<backup> -n openshift-adp \ --include-namespaces <namespace> \ --exclude-resources replicationcontroller,deploymentconfig,templateinstances.template.openshift.io \ --restore-volumes=true
$ velero restore create --from-backup=<backup> -n openshift-adp \1 --include-namespaces <namespace> \2 --exclude-resources replicationcontroller,deploymentconfig,templateinstances.template.openshift.io \ --restore-volumes=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow 验证
RestoreCR 的状态是否为Completed:oc get restore -n openshift-adp <restore> -o jsonpath='{.status.phase}'$ oc get restore -n openshift-adp <restore> -o jsonpath='{.status.phase}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow 创建一个
RestoreCR,以包括ReplicationController和DeploymentConfig资源:velero restore create --from-backup=<backup> -n openshift-adp \ --include-namespaces <namespace> \ --include-resources replicationcontroller,deploymentconfig \ --restore-volumes=true
$ velero restore create --from-backup=<backup> -n openshift-adp \ --include-namespaces <namespace> \ --include-resources replicationcontroller,deploymentconfig \ --restore-volumes=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow 验证
RestoreCR 的状态是否为Completed:oc get restore -n openshift-adp <restore> -o jsonpath='{.status.phase}'$ oc get restore -n openshift-adp <restore> -o jsonpath='{.status.phase}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow 验证备份资源是否已恢复:
oc get all -n <namespace>
$ oc get all -n <namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow