What is the easiest way to copy all Jenkins projects from one server to another?

9,806 views
Skip to first unread message

JenkinsUser

unread,
Dec 14, 2011, 11:55:11 PM12/14/11
to Jenkins Users
Hello all,

I need to migrate all of my Jenkins projects from one sever hosting
Jenkins to another server that is hosting it's own copy of Jenkins.
Both Jenkins are the exact same version.

Can someone suggest an easy way to do this? Neither servers will need
to communicate after this is done.

My source code is stored in SVN. Can my source code come along for the
ride?

Any help would be great!

Didier Durand

unread,
Dec 15, 2011, 12:22:12 AM12/15/11
to Jenkins Users
Hi,

If your new jenkins instance can access the old one via network, then
there is a plugin for that: https://wiki.jenkins-ci.org/display/JENKINS/Job+Import+Plugin

else you have to copy $JENKINS_HOME/jobs/each_of_your_jobs/config.xml
from 1 machine to the other to be able to restore your jobs easily

If your code comes from svn, I would recommend to let jenkins go: the
1st time you run the job on the new machine, source code will be
fetched from subversion

regards

didier

Ann Campbell

unread,
Dec 15, 2011, 8:23:31 AM12/15/11
to Jenkins Users
Depending on how much history you want to retain:

* you may also want to copy each job's "nextBuildNumber" document.
* ditto the job's builds dir
* I'd also copy the jenkins/fingerprints dir

Sujay Gmail

unread,
Dec 15, 2011, 12:09:45 AM12/15/11
to jenkins...@googlegroups.com, Jenkins Users
Jobimport plugin - copy the jobs from one instance to another..
Reply all
Reply to author
Forward
0 new messages