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?
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With