Backup and restore with large number of resources
Portworx Backup now enables you to protect complex applications that consist of large number of Kubernetes resources. You can simply append large number of resources or resource sets to your namespace(s) and swiftly perform backup and restore operations without any interruption.
Below topics guide you with instructions on how to create backups and restores of namespaces that involve large number of resources or resource sets.
Backup namespaces with large number of resources
To create a backup of namespaces mapped with large number of resources, perform the following steps:
In the home page, click on the cluster that holds the required namespace.
From the cluster page, select the required namespace(s) with large number of resources.
In All Resources drop-down under RESOURCE BACKUP SPECIFICATION, custom select the required resource(s).
Create Backup window does not display the resources included for the backup as the resource count is too large to display.
Portworx Backup does not allow custom selection of resources if you want to include them for the backup from the vertical ellipsis and when the resource count exceeds 1000. By default, all the resources in namespaces are selected for the backup. In such a scenario, the user interface displays the following notification message:
Following this notification message, Portworx Backup successfully creates a backup of namespace(s) with large number of resources. Considering the sheer number of resources tagged to a namespace, the user interface does not display the resource detail in the Backup Details window after creation of backup.
Restore backups with large number of resources
To retrieve the backups of namespaces that contain large number of resources from a source cluster to a destination cluster, perform the following steps:
From the home page, select the cluster where your backup (with large number of resources) exists.
Select the Vertical ellipsis at the end of the backup row and choose Restore.
In the Restore Backup window specify the necessary details.
Note that Portworx Backup user interface does not display the Resource Mapping field for custom restores of namespaces that contain a very large number of resources (>1000), because the resource count is too large to display.
Click Restore to restore the backup(s).
The progress bar displays the percentage completion of the restore.
To obtain detailed status or information during restore, click on the required restore.
After Portworx Backup successfully completes the restore, you can view the resource details in the Restore Details window through Vertical ellipsis >> Show Details at the end of the restore row. Resource details are not displayed in Restore Details window for large resource restores because of the large resource count.
NOTE: For default or custom restores, if the resources already exist in the namespace of destination cluster, Portworx Backup restores only the associated volumes of that namespace and not the resources. The user interface displays the status of such a restore as partial success.
User may see the following error message in the stork log for the specific resources associated with the restore, when a restore succeeds partially:
time="2023-04-24T08:47:26Z" level=warning msg="Error deleting ConfigMap <configmap-name> during restore, ReplacePolicy set to Retain: configmaps \"<configmap-name>\" already exists" ApplicationRestoreName=<name-of-restore> ApplicationRestoreUID=<restore-uid> Namespace=<namespace>
For uninterrupted backup and restore of namespaces that contain large number of resources, you can add few parameters to ConfigMap in the
kube-system namespace and customize to suit your environment. For more information on advanced settings related to such operations, refer Large resource ConfigMap parameters.