Adding Application-Consistent Protection for Kubernetes

Updated

On this page

For Kubernetes, to achieve application-consistent protection, you must use both pre-process and post-process script files. You can use pre-scripts and post-scripts on both Windows and Linux access nodes.

Pre-scripts and post-scripts are script files that run before or after certain job phases. The pre-scripts and post-scripts can be written in any scripting language such as bash, Perl, Python, and so on. The script files are copied and executed inside the application pods during the backup operation. To use Python scripts, you must pre-install Python in the pod.

You can customize the script files to suit your environment.

Procedure

  1. In the software_installation_directory, create a folder named kscripts/cluster_name as follows:

    • On a Windows access node, create the folder in the ContentStore\Base folder.

    • On a Linux access node, create the folder in the Base directory.

      Note: Pre-scripts and post-scripts fail if the cluster name is renamed.

  2. To execute the scripts for applications, create files in the folder kscripts\cluster_name with the following naming convention:

    • namespace.application_name.prescript

    • namespace.application_name.postscript

      where application_name is the name of the discovered application.

      To execute the scripts for all namespaces that have the specific application, use the following naming convention:

    • $.application_name.prescript

    • $.application_name.postscript

      where application_name is the name of the discovered application.