Search code examples
jenkinsjenkins-cli

Migrating settings between two instances of jenkins


How can I migrate settings between two instances of jenkins. I would like to configure an instance of Jenkins version 1.642.1 using a script.

I have an existing jenkins with the setting I want. It runs at

http://oldjenkins:8080

I have used ansible, vagrant to provision a new instance of jenkins with plugins on a new server. I have used JJB to copy the job configs I need.

The old jenkins has some more setting I want to migrate

How can I do this using a script or provisioning tool? Is there some export: import process which I need to learn about.


Solution

  • Migrating settings between two different masters is very similar to backup/restoring Jenkins settings in one and the same master.

    See answers to this question for more information on that.

    There's one additional caveat, though: host-specific settings (like Jenkins URL in the global configuration) must be adapted manually.