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