$JENKINS_HOME directory

1 minute read

$JENKINS_HOME is where all Jenkins-based installations store configuration, build logs, and artifacts.

Before determining which subdirectories of $JENKINS_HOME to include in your backup, you need to understand what is included in $JENKINS_HOME. For example, do you want to backup your build history? your artifacts? your cache?

Table 1. $JENKINS_HOME directories
Directory Description

config.xml

Root configuration

credentials.xml

Credentials file, encrypted using the secret key from the secrets/ directory

*.xml

Additional configuration files

userContent

Files to server under http://your_server/userContent/

fingerprints

Fingerprint records

nodes

Agent configuration

plugins

Plugins installed

secrets

Secrets for credentials

workspace

Working directory used for version control

workspace/*

Job directories, one per job

jobs

Directory for storing job files

jobs/YOUR_JOB_NAME

Sub-directory for YOUR_JOB_NAME, one per job name

jobs/YOUR_JOB_NAME/config.xml

Configuration file for YOUR_JOB_NAME, one per YOUR_NAME_JOB

jobs/YOUR_JOB_NAME/builds/lastSuccessfulBuild

Symbolic link to last successful build

jobs/YOUR_JOB_NAME/builds/

Sub-directory for job builds

jobs/YOUR_JOB_NAME/builds/BUILD_NUMBER/build.xml

Summary of build results, one per each unique `BUILD_NUMBER `

jobs/YOUR_JOB_NAME/builds/BUILD_NUMBER/log

Log file, one per each unique BUILD_NUMBER

jobs/YOUR_JOB_NAME/builds/BUILD_NUMBER/changelog.xml

Changelog, one per each unique BUILD_NUMBER