How do you move Jenkins to a new server or cluster?
IntermediateConceptBackups, HA, upgrades & performance
Answer
- Put the old controller in quiet-down and wait for builds.
- Stop it and copy
JENKINS_HOME(rsync, excluding workspaces) or restore from backup into the new volume. - Start the new controller with the same core and plugin versions (or the planned upgrade).
- Update the Jenkins URL in
unclassified.location.url, DNS, webhooks and agent connection URLs. - Verify credentials decrypt (this proves
secrets/came along), agents connect, and a test pipeline runs.
More on Backups, HA, upgrades & performance
What do you back up in Jenkins and what do you exclude?IntermediateHow do you back up Jenkins running on Kubernetes?IntermediateDoes Jenkins support active-active high availability?AdvancedHow do you plan a Jenkins LTS upgrade?IntermediateWhat does "Manage Old Data" mean after an upgrade?BeginnerHow do you size and tune the controller JVM?Advanced