About this question
I'd like to backup all Jenkins jobs and config files. What's the easiest way of doing it?
I'd like to backup all Jenkins jobs and config files. What's the easiest way of doing it?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask Salesforce Expert
Answered on Mar 7, 2023
All jobs (jobs/) and master config files (config.xml) can be found in backup Jenkins home folder (JENKINS_HOME ) in the following structure:
JENKINS_HOME
+- config.xml (jenkins root configuration)
+- *.xml (other site-wide configuration files)
+- userContent (files in this directory will be served under your http://server/userContent/)
+- fingerprints (stores fingerprint records)
+- plugins (stores plugins)
+- workspace (working directory for the version control system)
+- [JOBNAME] (sub directory for each job)
+- jobs
+- [JOBNAME] (sub directory for each job)
+- config.xml (job configuration file)
+- latest (symbolic link to the last successful build)
+- builds
+- [BUILD_ID] (for each build)
+- build.xml (build result summary)
+- log (log file)
+- changelog.xml (change log)
Most of the config are in XML format, so backing all .xml files should be enough.
All the settings, build logs, artefact archives are stored under the JENKINS_HOME directory. Simply archive this directory to make a back up. Similarly, restoring the data is just replacing the contents of the JENKINS_HOME directory from a backup.
Back ups can be taken without stopping the server, but when you restore, please do stop the server.
For consistent backups it is good practice to keep the JENKINS_HOME directory under the Git repository.
For example:
cd $JENKINS_HOME
git init
shopt -s globstar
git add **/config.xml git commit -m'Added job config files' -aand pushing the files to the external repository. You can also add the following .gitignore file to ignore some files.Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step Salesforce guides from industry experts
Common Salesforce interview questions, answered
Guides, tips and career advice on Salesforce from JanBask experts.
Salesforce How to Prepare for Salesforce Developer Certification: A Practical Guide
A step-by-step guide to Salesforce Developer certification - what to study for PD1, how PD2 fits in, and how to know you're ready…
Salesforce Salesforce Developer Certification Guide: Everything You Need to Know in 2026
Learn about Salesforce Developer Certification, including exam requirements, cost, topics, preparation time, retakes, and career…
Salesforce How to Prepare for Salesforce Admin Certification: A Practical Study Guide
Get a practical study plan for the Salesforce Admin exam - weighting by section, how to use Trailhead effectively, and how to…
Salesforce Salesforce Developer Salary Guide: How much you can earn
Discover the real Salesforce developer salary in 2026 by experience, location, skills & certifications. See what actually boosts…