$JENKINS_HOME/cache
Downloaded tools
$JENKINS_HOME/tools
Extracted tools
You can also be selective about what you back up in your build jobs data. The $JENKINS_HOME/jobs
directory contains job configuration, build history and archived files for each of your build jobs. The
structure of a build job directory is illustrated in Figure 13.9, “The builds directory”.
Figure 13.9. The builds directory
To understand how to optimize your Jenkins backups, you need to understand how the build job
directories are organized. Within the jobs directory there is a subdirectory for each build job. This
subdirectory contains two subdirectories of its own: builds and workspace. There is no need to
backup the workspace directory, as it will simply be restored with a clean checkout if Jenkins finds
it missing.
The builds directory, on the other hand, needs more attention. This directory contains the history of
your build results and previously-generated artifacts, with a time-stamped directory for each previous