Backup Jenkins on Kubernetes
You can use the instructions on this page to create pre and post backup rules with Portworx Backup, which take application-consistent backups for Jenkins on Kubernetes in production.
Jenkins stores data within a directory known as JENKINS_HOME
. Workspaces, plug-ins, jobs, user content and overall configuration exist within this directory and are vital when recovering from various types of failures.
See below for a snippet of what this might look like in a Kubernetes spec file.
...
volumeMounts:
- name: jenkins-home
mountPath: /var/jenkins_home
volumes:
- name: jenkins-home
persistentVolumeClaim:
claimName: jenkins-data
...
Once you configure a PVC to be mounted at /var/jenkins_home
you can use the below guide for pre and post backup rules.