* Correcting Openshift on IBM Documentation Error I have to admit to some significant error and embarrassment regarding the documentation update about Openshift on IBM Cloud pull request https://github.com/vmware-tanzu/velero/pull/8069. I will correct my error before it gets any further. Just exposing /var/data/kubelet/pods is incorrect and host path /var/lib/kubelet/pods should remain unchanged. The errors with the defaults during csi snapshot data movement were: data path backup failed: Failed to run kopia backup: unable to get local block device entry: resolveSymlink: lstat /var/data/: no such file or directory I suspected this was the same as RancherOS and Nutanix. It is not. The original tested changes changed both /var/lib/kubelet/{pods,plugins} to /var/data/kubelet/{pods,plugins}. The published changes only result in the error: ``` status: completionTimestamp: '2024-08-02T17:12:29Z' message: >- data path backup failed: Failed to run kopia backup: unable to get local block device entry: resolveSymlink: lstat /var/data/kubelet/plugins: no such file or directory node: 10.240.0.5 phase: Failed progress: {} startTimestamp: '2024-08-02T17:12:11Z' ``` After making continued modifications to the daemonset the correct configuration was: ``` volumeMounts: - name: host-pods mountPath: /host_pods mountPropagation: HostToContainer - name: host-plugins mountPath: /var/data/kubelet/plugins mountPropagation: HostToContainer ``` ``` volumes: - name: host-pods hostPath: path: /var/lib/kubelet/pods type: '' - name: host-plugins hostPath: path: /var/data/kubelet/plugins type: '' ``` Only the changes to the plugin path were required. The plugin path changes were required to both the mount path and the host path. Regardless of whether /var/lib/kubelet/pods or /var/data/kubelet/pods host path, backups and restore succeeded provided the plugin path was modified. ``` volumeMounts: - name: host-pods mountPath: /host_pods mountPropagation: HostToContainer - name: host-plugins mountPath: /var/data/kubelet/plugins mountPropagation: HostToContainer ``` ``` volumes: - name: host-pods hostPath: path: /var/data/kubelet/pods type: '' - name: host-plugins hostPath: path: /var/data/kubelet/plugins type: '' ``` After getting on-host access was able to confirm. Pods are at /var/lib/kubelet/pods. ``` ls /var/lib/kubelet/pods 07c0be63-335d-4cfb-b39f-816bc2fb32cd 51f31b3e-4710-4ef0-8626-5f1a78a624b2 a4802fd3-3b62-45a4-8f21-974880b6f92a cccb35c9-b4f9-4ca9-a697-736ae64f09ad 0a5d4366-7fa1-4525-9e45-a43a362b8542 558b0643-0661-4d4a-b03e-aac60c6ad710 a4b106fb-5b7b-48e5-828a-ea7b41ba0e59 ce1290e1-4330-4df6-8166-14784bcce930 ``` On host the volumes are in /var/data/kubelet/plugins. ``` ls /var/data/kubelet/plugins/kubernetes.io/csi/openshift-storage.cephfs.csi.ceph.com/231e04896c4f528efb95d23a3c153db9fc4a7206b7320f74443f30de7228dba5/globalmount/velero/backups/backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c/ backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-csi-volumesnapshotclasses.json.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-resource-list.json.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-csi-volumesnapshotcontents.json.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-results.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-csi-volumesnapshots.json.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-volumesnapshots.json.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-itemoperations.json.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c.tar.gz backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-logs.gz velero-backup.json backup-resources-41d84d16-47a7-4ea8-a9cb-6348d01bcb2c-podvolumebackups.json.gz ``` With the volume config changed to expose /var/data/kubelet/plugins for the plugin hostPath, the DataUploads and DataDownloads succeed for both Filesystem and Block mode PVCs. ``` status: completionTimestamp: '2024-08-02T17:23:33Z' node: 10.240.0.5 path: >- /host_pods/7fcb9d56-7885-437c-acd3-67db6b1ee8ae/volumeDevices/kubernetes.io~csi/pvc-47b91f56-db8c-44bf-9ecc-737170561b4b phase: Completed progress: bytesDone: 5368709120 totalBytes: 5368709120 snapshotID: 8faae36b3592fee4efbfad024f26033e startTimestamp: '2024-08-02T17:21:22Z' ``` ``` status: completionTimestamp: '2024-08-02T18:42:19Z' node: 10.240.0.5 phase: Completed progress: bytesDone: 5368709120 totalBytes: 5368709120 startTimestamp: '2024-08-02T18:41:00Z' ``` My apologies for the error. Signed-off-by: Michael Fruchtman <msfrucht@us.ibm.com> * Add context to plugins mountPath Signed-off-by: Michael Fruchtman <msfrucht@us.ibm.com> --------- Signed-off-by: Michael Fruchtman <msfrucht@us.ibm.com>
25 KiB
title, layout
| title | layout |
|---|---|
| CSI Snapshot Data Movement | docs |
CSI Snapshot Data Movement is built according to the Volume Snapshot Data Movement design and is specifically designed to move CSI snapshot data to a backup storage location.
CSI Snapshot Data Movement takes CSI snapshots through the CSI plugin in nearly the same way as CSI snapshot backup. However, it doesn't stop after a snapshot is taken. Instead, it tries to access the snapshot data through various data movers and back up the data to a backup storage connected to the data movers.
Consequently, the volume data is backed up to a pre-defined backup storage in a consistent manner.
After the backup completes, the CSI snapshot will be removed by Velero and the snapshot data space will be released on the storage side.
CSI Snapshot Data Movement is useful in below scenarios:
- For on-premises users, the storage usually doesn't support durable snapshots, so it is impossible/less efficient/cost ineffective to keep volume snapshots by the storage, as required by the CSI snapshot backup. This feature helps to move the snapshot data to a storage with lower cost and larger scale for long time preservation.
- For public cloud users, this feature helps users to fulfil the multiple cloud strategy. It allows users to back up volume snapshots from one cloud provider and preserve or restore the data to another cloud provider. Then users will be free to flow their business data across cloud providers based on Velero backup and restore.
Besides, Velero File System Backup which could also back up the volume data to a pre-defined backup storage. CSI Snapshot Data Movement works together with File System Backup to satisfy different requirements for the above scenarios. And whenever available, CSI Snapshot Data Movement should be used in preference since the File System Backup reads data from the live PV, in which way the data is not captured at the same point in time, so is less consistent.
Moreover, CSI Snapshot Data Movement brings more possible ways of data access, i.e., accessing the data from the block level, either fully or incrementally.
On the other hand, there are quite some cases that CSI snapshot is not available (i.e., you need a volume snapshot plugin for your storage platform, or you're using EFS, NFS, emptyDir, local, or any other volume type that doesn't have a native snapshot), then File System Backup will be the only option.
CSI Snapshot Data Movement supports both built-in data mover and customized data movers. For the details of how Velero works with customized data movers, check the Volume Snapshot Data Movement design. Velero provides a built-in data mover which uses Velero built-in uploaders (at present the available uploader is Kopia uploader) to read the snapshot data and write to the Unified Repository (by default implemented by Kopia repository).
The way for Velero built-in data mover to access the snapshot data is based on the hostpath access by Velero node-agent, so the node-agent pods need to run as root user and even under privileged mode in some environments, as same as File System Backup.
Setup CSI Snapshot Data Movement
Prerequisites
- The source cluster is Kubernetes version 1.20 or greater.
- The source cluster is running a CSI driver capable of support volume snapshots at the v1 API level.
- CSI Snapshot Data Movement requires the Kubernetes MountPropagation feature.
Install Velero Node Agent
Velero Node Agent is a Kubernetes daemonset that hosts Velero data movement modules, i.e., data mover controller, uploader & repository.
If you are using Velero built-in data mover, Node Agent must be installed. To install Node Agent, use the --use-node-agent flag.
velero install --use-node-agent
Configure Node Agent DaemonSet spec
After installation, some PaaS/CaaS platforms based on Kubernetes also require modifications the node-agent DaemonSet spec. The steps in this section are only needed if you are installing on RancherOS, Nutanix, OpenShift, OpenShift on IBM Cloud, VMware Tanzu Kubernetes Grid Integrated Edition (formerly VMware Enterprise PKS), or Microsoft Azure.
RancherOS
Update the host path for volumes in the node-agent DaemonSet in the Velero namespace from /var/lib/kubelet/pods to
/opt/rke/var/lib/kubelet/pods.
hostPath:
path: /var/lib/kubelet/pods
to
hostPath:
path: /opt/rke/var/lib/kubelet/pods
Nutanix
Update the host path for volumes in the node-agent DaemonSet in the Velero namespace from /var/lib/kubelet/pods to
/var/nutanix/var/lib/kubelet.
hostPath:
path: /var/lib/kubelet/pods
to
hostPath:
path: /var/nutanix/var/lib/kubelet
OpenShift
To mount the correct hostpath to pods volumes, run the node-agent pod in privileged mode.
-
Add the
veleroServiceAccount to theprivilegedSCC:oc adm policy add-scc-to-user privileged -z velero -n velero -
Install Velero with the '--privileged-node-agent' option to request a privileged mode:
velero install --use-node-agent --privileged-node-agent
If node-agent is not running in a privileged mode, it will not be able to access snapshot volumes within the mounted
hostpath directory because of the default enforced SELinux mode configured in the host system level. You can
create a custom SCC to relax the
security in your cluster so that node-agent pods are allowed to use the hostPath volume plugin without granting
them access to the privileged SCC.
By default a userland openshift namespace will not schedule pods on all nodes in the cluster.
To schedule on all nodes the namespace needs an annotation:
oc annotate namespace <velero namespace> openshift.io/node-selector=""
This should be done before velero installation.
Or the ds needs to be deleted and recreated:
oc get ds node-agent -o yaml -n <velero namespace> > ds.yaml
oc annotate namespace <velero namespace> openshift.io/node-selector=""
oc create -n <velero namespace> -f ds.yaml
OpenShift on IBM Cloud
Update the host path and mount path for volumes in the node-agent DaemonSet in the Velero namespace from /var/lib/kubelet/plugins to
/var/data/kubelet/plugins.
hostPath:
path: /var/lib/kubelet/plugins
to
hostPath:
path: /var/data/kubelet/plugins
and
- name: host-plugins
mountPath: /var/lib/kubelet/plugins
to
- name: host-plugins
mountPath: /var/data/kubelet/plugins
VMware Tanzu Kubernetes Grid Integrated Edition (formerly VMware Enterprise PKS)
You need to enable the Allow Privileged option in your plan configuration so that Velero is able to mount the hostpath.
The hostPath should be changed from /var/lib/kubelet/pods to /var/vcap/data/kubelet/pods
hostPath:
path: /var/vcap/data/kubelet/pods
Configure A Backup Storage Location
At present, Velero backup repository supports object storage as the backup storage. Velero gets the parameters from the
BackupStorageLocation to compose the URL to the backup storage.
Velero's known object storage providers are included here supported providers, for which, Velero pre-defines the endpoints. If you want to use a different backup storage, make sure it is S3 compatible and you provide the correct bucket name and endpoint in BackupStorageLocation. Velero handles the creation of the backup repo prefix in the backup storage, so make sure it is specified in BackupStorageLocation correctly.
Velero creates one backup repository per namespace. For example, if backing up 2 namespaces, namespace1 and namespace2, using kopia repository on AWS S3, the full backup repo path for namespace1 would be https://s3-us-west-2.amazonaws.com/bucket/kopia/ns1 and for namespace2 would be https://s3-us-west-2.amazonaws.com/bucket/kopia/ns2.
There may be additional installation steps depending on the cloud provider plugin you are using. You should refer to the plugin specific documentation for the must up to date information.
Note: Currently, Velero creates a secret named velero-repo-credentials in the velero install namespace, containing a default backup repository password.
You can update the secret with your own password encoded as base64 prior to the first backup (i.e., File System Backup, snapshot data movements) targeting to the backup repository. The value of the key to update is
data:
repository-password: <custom-password>
Backup repository is created during the first execution of backup targeting to it after installing Velero with node agent. If you update the secret password after the first backup which created the backup repository, then Velero will not be able to connect with the older backups.
Install Velero with CSI support on source cluster
On source cluster, Velero needs to manipulate CSI snapshots through the CSI volume snapshot APIs, so you must enable the EnableCSI feature flag and install the Velero CSI plugin on the Velero server.
Both of these can be added with the velero install command.
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.6.0 \
...
Configure storage class on target cluster
For Velero built-in data movement, CSI facilities are not required necessarily in the target cluster. On the other hand, Velero built-in data movement creates a PVC with the same specification as it is in the source cluster and expects the volume to be provisioned similarly. For example, the same storage class should be working in the target cluster.
By default, Velero won't restore storage class resources from the backup since they are cluster scope resources. However, if you specify the --include-cluster-resources restore flag, they will be restored. For a cross provider scenario, the storage class from the source cluster is probably not usable in the target cluster.
In either of the above cases, the best practice is to create a working storage class in the target cluster with the same name as it in the source cluster. In this way, even though --include-cluster-resources is specified, Velero restore will skip restoring the storage class since it finds an existing one.
Otherwise, if the storage class name in the target cluster is different, you can change the PVC's storage class name during restore by the changing PV/PVC storage class method. You can also configure to skip restoring the storage class resources from the backup since they are not usable.
Customized Data Movers
If you are using a customized data mover, follow the data mover's instructions for any further prerequisites.
For Velero side configurations mentioned above, the installation and configuration of node-agent may not be required.
To back up
Velero uses a new custom resource DataUpload to drive the data movement. The selected data mover will watch and reconcile the CRs.
Velero allows users to decide whether the CSI snapshot data should be moved per backup.
Velero also allows users to select the data mover to move the CSI snapshot data per backup.
The both selections are simply done by a parameter when running the backup.
To take a backup with Velero's built-in data mover:
velero backup create NAME --snapshot-move-data OPTIONS...
Or if you want to use a customized data mover:
velero backup create NAME --snapshot-move-data --data-mover DATA-MOVER-NAME OPTIONS...
When the backup starts, you will see the VolumeSnapshot and VolumeSnapshotContent objects created, but after the backup finishes, the objects will disppear.
After snapshots are created, you will see one or more DataUpload CRs created.
You may also see some intermediate objects (i.e., pods, PVCs, PVs) created in Velero namespace or the cluster scope, they are to help data movers to move data. And they will be removed after the backup completes.
The phase of a DataUpload CR changes several times during the backup process and finally goes to one of the terminal status, Completed, Failed or Cancelled. You can see the phase changes as well as the data upload progress by watching the DataUpload CRs:
kubectl -n velero get datauploads -l velero.io/backup-name=YOUR_BACKUP_NAME -w
When the backup completes, you can view information about the backups:
velero backup describe YOUR_BACKUP_NAME
kubectl -n velero get datauploads -l velero.io/backup-name=YOUR_BACKUP_NAME -o yaml
To restore
You don't need to set any additional information when creating a data mover restore. The configurations are automatically retrieved from the backup, i.e., whether data movement should be involved and which data mover conducts the data movement.
To restore from your Velero backup:
velero restore create --from-backup BACKUP_NAME OPTIONS...
When the restore starts, you will see one or more DataDownload CRs created.
You may also see some intermediate objects (i.e., pods, PVCs, PVs) created in Velero namespace or the cluster scope, they are to help data movers to move data. And they will be removed after the restore completes.
The phase of a DataDownload CR changes several times during the restore process and finally goes to one of the terminal status, Completed, Failed or Cancelled. You can see the phase changes as well as the data download progress by watching the DataDownload CRs:
kubectl -n velero get datadownloads -l velero.io/restore-name=YOUR_RESTORE_NAME -w
When the restore completes, view information about your restores:
velero restore describe YOUR_RESTORE_NAME
kubectl -n velero get datadownloads -l velero.io/restore-name=YOUR_RESTORE_NAME -o yaml
Limitations
- CSI and CSI snapshot support both file system volume mode and block volume mode. At present, Velero built-in data mover doesn't support block mode volume or volume snapshot.
- [Velero built-in data mover] At present, Velero uses a static, common encryption key for all backup repositories it creates. This means that anyone who has access to your backup storage can decrypt your backup data. Make sure that you limit access to the backup storage appropriately.
- [Velero built-in data mover] Even though the backup data could be incrementally preserved, for a single file data, Velero built-in data mover leverages on deduplication to find the difference to be saved. This means that large files (such as ones storing a database) will take a long time to scan for data deduplication, even if the actual difference is small.
- [Velero built-in data mover] You may need to customize the resource limits to make sure backups complete successfully for massive small files or large backup size cases, for more details refer to Velero file system level backup performance guide.
- The block mode is supported by the Kopia uploader, but it only supports non-Windows platforms, because the block mode code invokes some system calls that are not present in the Windows platform.
Troubleshooting
Run the following checks:
Are your Velero server and daemonset pods running?
kubectl get pods -n velero
Does your backup repository exist, and is it ready?
velero repo get
velero repo get REPO_NAME -o yaml
Are there any errors in your Velero backup/restore?
velero backup describe BACKUP_NAME
velero backup logs BACKUP_NAME
velero restore describe RESTORE_NAME
velero restore logs RESTORE_NAME
What is the status of your DataUpload and DataDownload?
kubectl -n velero get datauploads -l velero.io/backup-name=BACKUP_NAME -o yaml
kubectl -n velero get datadownloads -l velero.io/restore-name=RESTORE_NAME -o yaml
Is there any useful information in the Velero server or daemonset pod logs?
kubectl -n velero logs deploy/velero
kubectl -n velero logs DAEMON_POD_NAME
NOTE: You can increase the verbosity of the pod logs by adding --log-level=debug as an argument to the container command in the deployment/daemonset pod template spec.
If you are using a customized data mover, follow the data mover's instruction for additional troubleshooting methods.
How backup and restore work
CSI snapshot data movement is a combination of CSI snapshot and data movement, which is jointly executed by Velero server, CSI plugin and the data mover. This section lists some general concept of how CSI snapshot data movement backup and restore work. For the detailed mechanisms and workflows, you can check the Volume Snapshot Data Movement design.
Custom resource and controllers
Velero has three custom resource definitions and associated controllers:
-
DataUpload- represents a data upload of a volume snapshot. The CSI plugin creates oneDataUploadper CSI snapshot. Data movers need to handle these CRs to finish the data upload process.
Velero built-in data mover runs a controller for this resource on each node (in node-agent daemonset). Controllers from different nodes may handle one CR in different phases, but finally the data transfer is done by one single controller which will call uploaders from the backend. -
DataDownload- represents a data download of a volume snapshot. The CSI plugin creates oneDataDownloadper volume to be restored. Data movers need to handle these CRs to finish the data upload process.
Velero built-in data mover runs a controller for this resource on each node (in node-agent daemonset). Controllers from different nodes may handle one CR in different phases, but finally the data transfer is done by one single controller which will call uploaders from the backend. -
BackupRepository- represents/manages the lifecycle of Velero's backup repositories. Velero creates a backup repository per namespace when the first CSI snapshot backup/restore for a namespace is requested. You can see information about your Velero's backup repositories by runningvelero repo get.
This CR is used by Velero built-in data movers, customized data movers may or may not use it.
For other resources or controllers involved by customized data movers, check the data mover's instructions.
Backup
Velero backs up resources for CSI snapshot data movement backup in the same way as other backup types. When it encounters a PVC, particular logics will be conducted:
-
When it finds a PVC object, Velero calls CSI plugin through a Backup Item Action.
-
CSI plugin first takes a CSI snapshot to the PVC by creating the
VolumeSnapshotandVolumeSnapshotContent. -
CSI plugin checks if a data movement is required, if so it creates a
DataUploadCR and then returns to Velero backup. -
Velero now is able to back up other resources, including other PVC objects.
-
Velero backup controller periodically queries the data movement status from CSI plugin, the period is configurable through the Velero server parameter
--item-operation-sync-frequency, by default it is 10s. On the call, CSI plugin turns to check the phase of theDataUploadCRs. -
When all the
DataUploadCRs come to a terminal state (i.e.,Completed,FailedorCancelled), Velero backup persists all the necessary information and finish the backup. -
CSI plugin expects a data mover to handle the
DataUploadCR. If no data mover is configured for the backup, Velero built-in data mover will handle it. -
If the
DataUploadCR does not reach to the terminal state with in the given time, theDataUploadCR will be cancelled. You can set the timeout value per backup through the--item-operation-timeoutparameter, the default value is4 hours. -
Velero built-in data mover creates a volume from the CSI snapshot and transfer the data to the backup storage according to the backup storage location defined by users.
-
After the volume is created from the CSI snapshot, Velero built-in data mover waits for Kubernetes to provision the volume, this may take some time varying from storage providers, but if the provision cannot be finished in a given time, Velero built-in data mover will cancel this
DataUploadCR. The timeout is configurable through a node-agent's parameterdata-mover-prepare-timeout, the default value is 30 minutes. -
When the data transfer completes or any error happens, Velero built-in data mover sets the
DataUploadCR to the terminal state, eitherCompletedorFailed. -
Velero built-in data mover also monitors the cancellation request to the
DataUploadCR, once that happens, it cancels its ongoing activities, cleans up the intermediate resources and set theDataUploadCR toCancelled.
Restore
Velero restores resources for CSI snapshot data movement restore in the same way as other restore types. When it encounters a PVC, particular logics will be conducted:
-
When it finds a PVC object, Velero calls CSI plugin through a Restore Item Action.
-
CSI plugin checks the backup information, if a data movement was involved, it creates a
DataDownloadCR and then returns to Velero restore. -
Velero is now able to restore other resources, including other PVC objects.
-
Velero restore controller periodically queries the data movement status from CSI plugin, the period is configurable through the Velero server parameter
--item-operation-sync-frequency, by default it is 10s. On the call, CSI plugin turns to check the phase of theDataDownloadCRs. -
When all
DataDownloadCRs come to a terminal state (i.e.,Completed,FailedorCancelled), Velero restore will finish. -
CSI plugin expects the same data mover for the backup to handle the
DataDownloadCR. If no data mover was configured for the backup, Velero built-in data mover will handle it. -
If the
DataDownloadCR does not reach to the terminal state with in the given time, theDataDownloadCR will be cancelled. You can set the timeout value per backup through the same--item-operation-timeoutparameter. -
Velero built-in data mover creates a volume with the same specification of the source volume.
-
Velero built-in data mover waits for Kubernetes to provision the volume, this may take some time varying from storage providers, but if the provision cannot be finished in a given time, Velero built-in data mover will cancel this
DataDownloadCR. The timeout is configurable through the same node-agent's parameterdata-mover-prepare-timeout. -
After the volume is provisioned, Velero built-in data mover starts to transfer the data from the backup storage according to the backup storage location defined by users.
-
When the data transfer completes or any error happens, Velero built-in data mover sets the
DataDownloadCR to the terminal state, eitherCompletedorFailed. -
Velero built-in data mover also monitors the cancellation request to the
DataDownloadCR, once that happens, it cancels its ongoing activities, cleans up the intermediate resources and set theDataDownloadCR toCancelled.
Parallelism
Velero calls the CSI plugin concurrently for the volume, so DataUpload/DataDownload CRs are created concurrently by the CSI plugin. For more details about the call between Velero and CSI plugin, check the Volume Snapshot Data Movement design.
In which manner the DataUpload/DataDownload CRs are processed is totally decided by the data mover you select for the backup/restore.
For Velero built-in data mover, it uses Kubernetes' scheduler to mount a snapshot volume/restore volume associated to a DataUpload/DataDownload CR into a specific node, and then the DataUpload/DataDownload controller (in node-agent daemonset) in that node will handle the DataUpload/DataDownload.
At present, a DataUpload/DataDownload controller in one node handles one request at a time.
That is to say, the snapshot volumes/restore volumes may spread in different nodes, then their associated DataUpload/DataDownload CRs will be processed in parallel; while for the snapshot volumes/restore volumes in the same node, their associated DataUpload/DataDownload CRs are processed sequentially.
You can check in which node the DataUpload/DataDownload CRs are processed and their parallelism by watching the DataUpload/DataDownload CRs:
kubectl -n velero get datauploads -l velero.io/backup-name=YOUR_BACKUP_NAME -w
kubectl -n velero get datadownloads -l velero.io/restore-name=YOUR_RESTORE_NAME -w
Cancellation
At present, Velero backup and restore doesn't support end to end cancellation that is launched by users.
However, Velero cancels the DataUpload/DataDownload in below scenarios automatically:
- When Velero server is restarted
- When node-agent is restarted
- When an ongoing backup/restore is deleted
- When a backup/restore does not finish before the item operation timeout (default value is
4 hours)
Customized data movers that support cancellation could cancel their ongoing tasks and clean up any intermediate resources. If you are using Velero built-in data mover, the cancellation is supported.