Migrating a Jenkins instance to a new machine

Article ID:4402701337997
2 minute readKnowledge base

Issue

  • I would like to move my entire Jenkins configuration (and all of my Jenkins jobs) to a new node/machine.

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:

  1. Install the correct version of Jenkins on new machine. It should match the one used on the instance you are migrating from.

  2. Migrate the startup Java arguments from the old instance to the new one. You can find the relevant file paths for your product here.

  3. Stop the old instance to prevent conflicts when the new one is started.

  4. Backup the Origin Controller’s $JENKINS_HOME. Refer to Backup and restore.

  5. Copy $JENKINS_HOME to the Destination Controller.

  6. Check (and edit, if needed) config.xml for URL specific options. Remove any settings which contains references to the Source URL.

  7. 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.

  8. 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.

  1. 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.