How do you back up and restore Jenkins?
IntermediateProductionJenkins in Production
Answer
Everything important is under JENKINS_HOME: config.xml, jobs/, credentials.xml, secrets/ (encryption keys, required to decrypt credentials), plugins/, users/. Back up with volume snapshots (EBS, CSI snapshots) or a file-level backup excluding workspace/ and build caches. With JCasC and pipeline-as-code, much of this is reproducible from Git, but credentials, build history and keys are not, so protect the secrets/ directory like a root key. Test restores periodically on a scratch instance.
More on Jenkins in Production
How do you run Jenkins for high availability and scale?AdvancedHow do you tune the Jenkins controller JVM and avoid out-of-memory crashes?AdvancedHow do you upgrade Jenkins and its plugins safely?IntermediateHow do you harden a Jenkins controller?AdvancedHow do you configure dynamic Kubernetes agents in Jenkins for production use?IntermediateWhat are the pitfalls of Docker socket mounting in Jenkins agents, and what are alternatives?Advanced