What do you back up in Jenkins and what do you exclude?
IntermediateConceptBackups, HA, upgrades & performance
Answer
Back up all of JENKINS_HOME except caches and rebuildable data:
| Include | Exclude |
|---|---|
config.xml, *.xml at root |
workspace/ |
jobs/ (config and builds/) |
caches/ |
secrets/, credentials.xml |
plugins/*/ exploded dirs (keep .jpi or rebuild from image) |
users/, nodes/ |
war/, logs/ optional |
userContent/, fingerprints/ |
.cache/, tools/ |
With config in Git (image + JCasC), the backup's real value is build history, credentials not in an external store, and secrets/.
More on Backups, HA, upgrades & performance
How do you back up Jenkins running on Kubernetes?IntermediateDoes Jenkins support active-active high availability?AdvancedHow do you plan a Jenkins LTS upgrade?IntermediateWhat does "Manage Old Data" mean after an upgrade?BeginnerHow do you size and tune the controller JVM?AdvancedWhat are the most common causes of a slow Jenkins controller?Intermediate