Open liyin37 opened 3 weeks ago
velero debug backup create test-backup-2024081902 \
--include-cluster-resources=true \
--include-namespaces test \
--default-volumes-to-fs-backup \
--namespace velero-system
This command doesn't look right.
The velero debug
CLI is used to collect the debug information for backup or restore.
The velero backup create
is used to create a Velero backup.
Your command mixes them.
not satisfy the criteria for VolumePolicy or the legacy snapshot way
This means the backup doesn't backup the volume data in the snapshot way.
Please check whether those volumes are backed up by the File-System way.
@blackpiglet sorry, I writed wrong cmd,right cmd is below:
velero backup create test-backup-2024081902 \
--include-cluster-resources=true \
--include-namespaces test \
--default-volumes-to-fs-backup \
--namespace velero-system
but the pvc data dont backup succussfully
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
local.path.provisioner/selected-node: k8s-node3
pv.kubernetes.io/provisioned-by: rancher.io/local-path
creationTimestamp: "2024-08-19T16:20:38Z"
finalizers:
- kubernetes.io/pv-protection
name: pvc-89a57302-33a4-426d-ad54-f5c5a259e471
resourceVersion: "61852"
uid: b7a99f1a-c11b-4221-8e91-f387e132d894
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 100Gi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: data-postgis-md-0
namespace: test
resourceVersion: "61835"
uid: 89a57302-33a4-426d-ad54-f5c5a259e471
hostPath:
path: /opt/local-path-provisioner/pvc-89a57302-33a4-426d-ad54-f5c5a259e471_test_data-postgis-md-0
type: DirectoryOrCreate
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- k8s-node3
persistentVolumeReclaimPolicy: Delete
storageClassName: standard
volumeMode: Filesystem
status:
phase: Bound
Please help collect the debug info by running the command velero debug
and uploading the generated tarball.
@blackpiglet
@liyin37 What is the type of the PV? It seems it's HostPath.
@blackpiglet hostPath,but use rancher.io/local-path storage
Please notice the file system backup doesn't support HostPath volumes. https://velero.io/docs/v1.14/file-system-backup/#limitations
we have two clusters: cluster A
clusterB
clusterA backup one namespace,the namespace resource have PVC
when I install the verelo ,the version is: 1.14.0
then,I execute below cmd:
check the logs:
the pvc doesnt backupd