Kubernetes 未还原PersistentVolumeClaim

Kubernetes 未还原PersistentVolumeClaim,kubernetes,backup,velero,Kubernetes,Backup,Velero,我将以下值设置为使用helm的velero配置 schedules: my-schedule: schedule: "5 * * * *" template: includeClusterResources: true includedNamespaces: - jenkins includedResources: - 'pv

我将以下值设置为使用
helm
velero
配置

    schedules:
      my-schedule:
        schedule: "5 * * * *"
        template:
          includeClusterResources: true
          includedNamespaces:
          - jenkins
          includedResources:
          - 'pvcs'
          storageLocation: backups
          snapshotVolumes: true
          ttl: 24h0m0s
我有一个PVC(和一个动态配置的底层PV),我手动删除了它(和PV一起)

然后,我执行了
velero
还原(指向在PV/PVC删除之前执行的
备份
),如下所示:

extra services
是部署
velero
的命名空间

尽管日志表明恢复已成功:

▶ velero restore logs velero-hourly-backup-20201119140005-20201119183805 -n extra-services
time="2020-11-19T16:38:06Z" level=info msg="starting restore" logSource="pkg/controller/restore_controller.go:467" restore=extra-services/velero-hourly-backup-20201119140005-20201119183805
time="2020-11-19T16:38:06Z" level=info msg="Starting restore of backup extra-services/velero-hourly-backup-20201119140005" logSource="pkg/restore/restore.go:363" restore=extra-services/velero-hourly-backup-20201119140005-20201119183805
time="2020-11-19T16:38:06Z" level=info msg="restore completed" logSource="pkg/controller/restore_controller.go:482" restore=extra-services/velero-hourly-backup-20201119140005-20201119183805
我在还原描述中看到以下错误:

Name:         velero-hourly-backup-20201119140005-20201119183805
Namespace:    extra-services
Labels:       <none>
Annotations:  <none>

Phase:  PartiallyFailed (run 'velero restore logs velero-hourly-backup-20201119140005-20201119183805' for more information)

Started:    2020-11-19 18:38:05 +0200 EET
Completed:  2020-11-19 18:38:07 +0200 EET

Errors:
  Velero:   error parsing backup contents: directory "resources" does not exist
  Cluster:    <none>
  Namespaces: <none>

Backup:  velero-hourly-backup-20201119140005

Namespaces:
  Included:  all namespaces found in the backup
  Excluded:  <none>

Resources:
  Included:        persistentvolumeclaims
  Excluded:        nodes, events, events.events.k8s.io, backups.velero.io, restores.velero.io, resticrepositories.velero.io
  Cluster-scoped:  auto

Namespace mappings:  <none>

Label selector:  <none>

Restore PVs:  auto
名称:velero-hourly-backup-202011119140005-202011119183805
命名空间:额外服务
标签:
注释:
阶段:部分失败(有关详细信息,请运行“velero恢复日志velero-hourly-backup-2020119191005-202011119183805”)
开始时间:2020-11-19 18:38:05+0200 EET
完成时间:2020-11-19 18:38:07+0200 EET
错误:
Velero:分析备份内容时出错:目录“资源”不存在
集群:
名称空间:
备份:velero-hourly-Backup-2020119140005
名称空间:
包括:备份中找到的所有名称空间
排除:
资源:
包括:persistentvolumeclaims
排除:节点、事件、events.events.k8s.io、backups.velero.io、restores.velero.io、resticrepositories.velero.io
集群范围:自动
命名空间映射:
标签选择器:
恢复PVs:自动
有什么想法吗

这与我删除PV/PVC有关吗?(毕竟我试着模拟灾难情况)


我已经启用了备份功能和快照功能设置为
true

您是否尝试运行
velero恢复日志velero-hourly-backup-202011119140005-202011119183805
以获取更多信息?您是否尝试运行
velero恢复日志velero-hourly-backup-202011119140005-202011119183805
以获取更多信息信息?
Name:         velero-hourly-backup-20201119140005-20201119183805
Namespace:    extra-services
Labels:       <none>
Annotations:  <none>

Phase:  PartiallyFailed (run 'velero restore logs velero-hourly-backup-20201119140005-20201119183805' for more information)

Started:    2020-11-19 18:38:05 +0200 EET
Completed:  2020-11-19 18:38:07 +0200 EET

Errors:
  Velero:   error parsing backup contents: directory "resources" does not exist
  Cluster:    <none>
  Namespaces: <none>

Backup:  velero-hourly-backup-20201119140005

Namespaces:
  Included:  all namespaces found in the backup
  Excluded:  <none>

Resources:
  Included:        persistentvolumeclaims
  Excluded:        nodes, events, events.events.k8s.io, backups.velero.io, restores.velero.io, resticrepositories.velero.io
  Cluster-scoped:  auto

Namespace mappings:  <none>

Label selector:  <none>

Restore PVs:  auto