Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

JENKINS_HOME directory

Jenkins needs some disk space to perform builds and keep archives. You can check this location from the configuration screen of Jenkins.

By default, this is set to ~/.jenkins, but you can change this in one of the following ways:

  • Set "JENKINS_HOME" environment variable to the new home directory before launching the servlet container.
  • Set "JENKINS_HOME" system property to the servlet container.
  • Set JNDI environment entry "JENKINS_HOME" to the new directory.

See the container specific documentation collection for more about how to do this for your container.

You can change this location after you've used Jenkins for a while, too. To do this, stop Jenkins completely, move the contents from old JENKINS_HOME to the new home, set the new JENKINS_HOME, and restart Jenkins.

JENKINS_HOME has a fairly obvious directory structure that looks like the following:

 +- 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)
 +- nodes          (slave configurations)
 +- plugins        (stores plugins)
 +- secrets        (secretes needed when migrating credentials to other servers)
 +- 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)

Back up and restore

All the settings, build logs, artifact 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 back up.

Back ups can be taken without stopping the server, but when you restore, please do stop the server.

Moving/copying/renaming jobs

You can:

  1. Move a job from one installation of Jenkins to another by simply copying the corresponding job directory.
  2. Make a copy of an existing job by making a clone of a job directory by a different name.
  3. Rename an existing job by renaming a directory. Note that the if you change a job name you will need to change any other job that tries to call the renamed job.

Those operations can be done even when Jenkins is running. For changes like these to take effect, you have to click "reload config" to force Jenkins to reload configuration from the disk.

Batch renaming jobs

Replacing spaces in job names with underscores

$ rename 's/\s/_/g' *

Archive unused jobs

Sometimes you want to remove a job from Jenkins but do so in such a way that you can resurrect it later, if the need arises. You can do this by going to $JENKINS_HOME and create an archive of the job directory. The following command illustrates how to archive a job 'xyz' and remove it.

$ cd $JENKINS_HOME/jobs
$ tar czf xyz.tgz xyz
// go to Jenkins GUI "Manage Jenkins" page and "Reload Configuration from Disk"

As long as you are not building the xyz project while you create an archive, you can do this operation without taking Jenkins offline.

Script Console

Useful for trouble-shooting, diagnostics or batch updates of jobs Jenkins provides a script console which gives you access to all Jenkins internals.
These scripts are written in Groovy and you'll find some samples of them in this page.

URL Options


where [command] can be

  • exit shutdown jenkins
  • restart restart jenkins
  • reload to reload the configuration


  1. Anonymous

    I am getting "Hudson detected that you appear to be running more than one
    instance of Hudson that share the same home directory '/home/java/.hudson'. This
    greatly confuses Hudson and you will likely experience strange behaviors, so
    please correct the situation." error occasionally.  I am using version 1.180.
    Is this an issue?  What am I doing wrong?

  2. Unknown User (liyun)

    How to hide the WorkSpace Link and picture link on the Web GUI, I don't want the source code can be download by anyone. Is there anyone know how to do that?


  3. Unknown User (liyun)

    How to hide the WorkSpace Link and picture link on the Web GUI, I don't want the source code can be download by anyone. Is there anyone know how to do that?


  4. Unknown User (liyun)

    How to hide the WorkSpace Link and picture link on the Web GUI, I don't want the source code can be download by anyone. Is there anyone know how to do that?


  5. Unknown User (lhaims)

    What path/partition is used to determine "free disk space" in Linux?  I'm constantly getting:

    WARNING: Making  offline temporarily due to the lack of disk space

    When I look at /computer, it shows "Free Disk Space" to be 0.680 GB for master, but I have at least 30GB free in the user.dir and user.home directories (viewing with df). Free swap space looks fine.

  6. Unknown User (elser)

    I have a backup-ing job that runs every hour and gathers only configuration xmls that are needed to restore jobs.
    It is built periodically (every hour from 8:00AM till 6:00PM, Monday-Friday):
    0 8-18 * * 1-5

    It contains single "Execute shell" build step:

    export CUR_PATH=`pwd`
    find -maxdepth 3 -name config.xml|xargs tar cvf configs.tar
    mv configs.tar $CUR_PATH/configs.tar

    And  "Archive the artifacts" contains only "configs.tar", so we keep the history of jobs.
    You can even add some scp to push the tar forward to another server.

  7. Unknown User (sheck)

    Hi all,

    Does anyone know if it is possible to share the same build number between several jobs?

    I already tried a little hack but it did not work:

    I used symlinks so that job A and job B  points to the same nextBuildNumber file. But the hudson job process seems to delete the nextBuildNumber file and then create a new nextBuildNumber (so the symlinks were destroyed).

    Thanks, Stephane

  8. Unknown User (tomas.homola@gmail.com)

  9. Unknown User (nagarajus)

    Hi All,

    i am new to the jenkins ci tool.creating and configuring jobns every thng working fine.

    But sometimes jenkins is shutting down automatically.

    i dont the reason why it is behaving like that.

    So please can anyone help me how to fix this issue.



  10. Unknown User (victorwss)

    The backup suggestions did not works for me: Windows can't copy directories which contains symbolic links. I tried to do it some other ways, but few Windows tools recognize symbolic links, and the ones that does tends to replace them with copies of the linked data.

  11. Unknown User (atult967)

    i want to copy jenkins jobs to my slave server using groovy script ....

    hello = "JobIWantToCopy";
    for(item in hudson.model.Hudson.instance.items) {
    loc = item.name.indexOf(hello);
    if (loc >= 0) {

    but its not working please someone help me out.