Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I copy a job from one instance to another?

Tags:

jenkins

I am setting up a new server to run Jenkins. I have an existing Jenkins server with jobs in place. Now, I want to copy the jobs over from the old instance to the new instance.

On the new instance I am at the New Job screen. I notice that there is a "copy existing job" option. When I put in the path to the job on the old instance, I keep getting an error saying "no such job at http://old-instance/job/jobName".

How can I copy a job from one instance to another?

like image 834
Isaac Avatar asked Jan 27 '12 19:01

Isaac


People also ask

How do I copy a Jenkins job from one instance to another?

According to the manual, https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins, it's simply to move the corresponding job directory to the new Jenkins instance. The "Copy existing Job" option requires the job to exist on the current Jenkins instance. It's an option to use the existing job as a template.

How do I move or copy Jenkins from one server to another?

Install ThinBackup on both the source and the target Jenkins servers. Configure the backup directory on both (in Manage Jenkins → ThinBackup → Settings) On the source Jenkins, go to ThinBackup → Backup Now. Copy from Jenkins source backup directory to the Jenkins target backup directory.


2 Answers

According to the manual, https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins, it's simply to move the corresponding job directory to the new Jenkins instance.

The "Copy existing Job" option requires the job to exist on the current Jenkins instance. It's an option to use the existing job as a template. It can't be used to move jobs between instances.

like image 134
Magnus Avatar answered Sep 20 '22 01:09

Magnus


There is a very plugin to do that online without file copies (which also works): the Job Import plugin: https://plugins.jenkins.io/job-import-plugin/

regards

didier

like image 41
Didier Durand Avatar answered Sep 20 '22 01:09

Didier Durand