Skip to main content
Version: 2.7

KDMP ConfigMap

KDMP-config ConfigMap

Exclude files and directories

Consider a scenario where you have directories or files (hidden, read-only, logs) with different extensions and you wish to exclude those from being included in the backup. Portworx Backup now allows you to exclude such directories or files from being backed up. To exclude or omit such directories and files from being included in the backup, you need to update the kdmp-config ConfigMap with the following steps:

  1. On the source application cluster, run the following command to edit the kdmp-config ConfigMap:
kubectl edit cm kdmp-config -n kube-system
  1. Add the following key-value pair:
KDMP_EXCLUDE_FILE_LIST: |
<storageclassName1>=<dir-list>,<file-list1>,....
<storageclassName2>=<dir-list>,<file-list1>,....

Example

apiVersion: v1
data:
ENABLE_PX_GENERIC_BACKUP: "true"
KDMP_BACKUP_JOB_LIMIT: "5"
KDMP_DELETE_JOB_LIMIT: "5"
KDMP_EXCLUDE_FILE_LIST: |
px-db=dir1,file1,dir2
mysql=dir1,file1,dir2
KDMP_KOPIAEXECUTOR_IMAGE: kopiaexecutor:1.2.10
KDMP_KOPIAEXECUTOR_IMAGE_SECRET: ""
KDMP_KOPIAEXECUTOR_LIMIT_CPU: "0.2"
KDMP_KOPIAEXECUTOR_LIMIT_MEMORY: 1Gi
KDMP_KOPIAEXECUTOR_REQUEST_CPU: "0.1"
KDMP_KOPIAEXECUTOR_REQUEST_MEMORY: 700Mi
KDMP_MAINTENANCE_JOB_LIMIT: "5"
KDMP_RESTORE_JOB_LIMIT: "5"
SNAPSHOT_TIMEOUT: ""
kind: ConfigMap
metadata:
name: kdmp-config
namespace: kube-system
resourceVersion: "7120917"
uid: bd1e505b-0191-414c-aedb-0b1d413d4002

You can exclude directories and files from being backed up for both direct KDMP and KDMP with CSI (local snapshot) backup types. For the latter, you cannot exclude any directories or files from being backed up if the local snapshot already exists even after kdmp-config ConfigMap is updated with the key-value pair specified above. If you want to restore with excluded directories or files, delete the existing local snapshot and then restore the backup.

KDMP backups and restores with large volume PVCs

KDMP job pods consume increased amounts of memory for the large volume PVC backup and restore operations to backup locations. As a result, you may see out of memory alerts or a failure of the kdmp job pods that run on each application or target cluster. During these scenarios, Portworx by PureStorage recommends to increase the CPU and memory limit related parameters in the kdmp-config ConfigMap which resides in the kube-system namespace on the target cluster or application cluster.

  • Update the following parameters in kdmp-config ConfigMap to resolve OOM errors:

    KDMP_KOPIAEXECUTOR_LIMIT_CPU: "0.4"
    KDMP_KOPIAEXECUTOR_REQUEST_CPU: "0.2"
    KDMP_KOPIAEXECUTOR_REQUEST_MEMORY: 2Gi
    KDMP_KOPIAEXECUTOR_LIMIT_MEMORY: 4Gi

Related topics:

Was this page helpful?