If a backup or restore job partially fails, you can perform troubleshooting based on the cause of the failure and retry the job. This topic describes common cases of partially failed backup or restore jobs and their solutions.
The backup or restore job partially failed, and the YAML configuration for the migrate-plugin add-on shows OOMKilled.
The migrate-plugin add-on has a default memory limit of 512 MiB. When a backup or restore job involves a large number or size of resources, insufficient memory will cause an OOM (Out of Memory).
Modify the migrate-plugin add-on configuration to appropriately increase the memory limit. It is recommended to increase 512 MiB of memory for every 1,000 resources. You can adjust available memory based on your actual requirements. Procedure:
- In the VKE console, go to the Cluster list and click the name of the source cluster of the backup to go to the cluster management page.
- Click Workload > Deployment. On the page that appears, search for migrate-plugin in the kube-system namespace.
-
- Click Update or Edit Yaml to modify the memory limit of the migrate-plugin add-on. Then, save the configuration.
-
Insufficient RBAC permissions for migrate-plugin
The backup or restore job partially failed, and the job log shows forbidden: User "xxxx" cannot get resource "xxxx" in API group "xxxx" at the cluster scope.
For data security reasons, some components of the migrate-plugin add-on have limited RBAC permissions by default. This results in some resources failing to be backed up or restored due to insufficient permissions.
Manually modify the configuration of migrate-plugin-server in the ClusterRole to grant resource permissions. Procedure:
- In the VKE console, go to the Cluster list and click the name of the source cluster of the backup to go to the cluster management page.
- Click Workload > Resource Explorer. On the page that appears, find rbac.authorization.k8s.io in the API Group category, and click the name to go to the management page.
-
- Click ClusterRole in the Resource definition list. In the list of resources, find migrate-plugin-server, and click Edit Yaml in the Actions column.
-
- Find the configuration by the API group indicated in the error, and add the missing permissions indicated in the error message. For example, add priorityclasses to resources in the scheduling.k8s.io API group.
tip
If the migrate-plugin-server YAML configuration is missing the API group indicated in the error, add the apiGroup, resources, and verbs configuration items sequentially in accordance with the YAML format.
-