Interview Prep/CI/CD/Jenkins in Production

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.

All CI/CD questions

More on Jenkins in Production