Issue
-
I would like to move my entire Jenkins configuration (and all of my Jenkins jobs) to a new node/machine.
Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
Resolution
NOTE: This procedure should only be used when decommissioning the old instance. If you want to clone an instance to create an additional controller, please follow this guide.
This will preserve all of your Jenkins configuration and other settings. Please follow this procedure:
-
Install the correct version of Jenkins on new machine. It should match the one used on the instance you are migrating from.
-
Migrate the startup Java arguments from the old instance to the new one. You can find the relevant file paths for your product here.
-
Stop the old instance to prevent conflicts when the new one is started.
-
Backup the Origin Controller’s
$JENKINS_HOME
. Refer to Backup and restore. -
Copy
$JENKINS_HOME
to the Destination Controller. -
Check (and edit, if needed)
config.xml
for URL specific options. Remove any settings which contains references to the Source URL. -
Start the new instance using Quiet start. If you are not using a CloudBees distributed release, you will not have access to the Quiet Start Plugin, instead refer to this article.
-
Navigate to ‘Manage Jenkins’ -> ‘Configure System’ and ‘Configure Security’ and update any settings as needed. Some settings (such as the Jenkins URL) are specific to each instance, and may need to be re-configured for your destination instance.
If needed, disable Security.
-
Uncheck the Quiet start. You can toggle this via the URLs
/quietDown
and/cancelQuietDown
. e.g:https://<jenkins-url>/cancelQuietDown
. If you are not using a CloudBees distributed release, you will not have access to the Quiet Start Plugin, instead refer to this article.