PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 13, 2022

[FIXED] How can I copy the Jenkins build history from one server to another?

 April 13, 2022     jenkins, jenkins-plugins, migration     No comments   

Issue

We're moving servers to another system. We have setup Jenkins, imported all jobs with the job import plugin.

Next I would like to import the data for each of those jobs. This is what I'm talking about:

Build history of every individual job

Please note that the jobs are distributed across multiple folders and subfolders. How can I copy/move the build history for each of these jobs to the new server?


Solution

I have just completed the same mirgration minutes ago, lol. You can do it simply by putting the folders in your old server's build path to new one.

The build history locates in the build directory, if you don't know where it is, check the config.xml in your Jenkins folder (AKA $JENKINS_HOME\config.xml) and ctrl+F "buildsDir".

Default build path in Jenkins is ${ITEM_ROOTDIR}/builds, which is inside the jobs folder under $JENKINS_HOME. I personally recommend you to have the history and Jenkins home located in different drives for a better memory management.

So, simply copy the jobs and history to the new build server, put the old jobs under $JENKINS_HOME\jobs and the old build folder in the new build directory (buildsDir).

Noted that there are some files that cannot be copied because there are some pointers such as Last Successful build, lastFailedBuild in the history. Simply skip those files

Hope it helps



Answered By - Near
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing