Backup Approaches
| Approach | Description | Tools / Plugins |
|---|---|---|
| File-system snapshots | Capture a point-in-time, consistent copy of the entire file system. | Linux LVM, AWS EBS snapshots, GCP persistent disks |
| Jenkins plugins | Export Jenkins configuration and jobs via plugin interfaces. | ThinBackup |
| Custom scripts | Copy only essential directories and files to a backup location. | Bash, PowerShell, rsync |
| Hybrid strategy | Use local snapshots for speed, then replicate to remote storage. | Combination of above |
The ThinBackup plugin is the only actively maintained backup plugin for Jenkins. Other plugins may be outdated or lack features.
What to Backup
Your$JENKINS_HOME directory (typically /var/lib/jenkins on Linux) holds all your Jenkins data. While full-directory backups are the simplest, selective backups can save storage and speed up operations.
Essential Inclusions
| Directory / File | Purpose | Priority |
|---|---|---|
config.xml, *.xml | Global Jenkins and system configurations | High |
jobs/[JOBNAME]/config.xml | Job definitions and parameters | High |
secrets/, identity.key.enc | Credentials and master keys | High |
fingerprints/ | Artifact tracking records | Medium |
nodes/ | Build agent configurations | Medium |
plugins/ | Installed plugin binaries (can be reinstalled) | Low–Medium |
Optional Exclusions
workspace/directories (recreated on build)- Build artifacts and logs (exclude if storing centrally)
- Caches and temporary files
- Plugin data that can be fetched again from Update Center
Always encrypt your backups at rest and in transit. Store credentials and master keys securely to prevent unauthorized access.
By exporting these files—via snapshots, plugins, or scripts—and replicating them to secure local and remote targets, you ensure a solid Jenkins disaster-recovery strategy.