Environment Overview
| VM Name | IP Address | Role |
|---|---|---|
| jenkins-controller-1 | 64.227.x.x | Source node |
| ubuntu-docker-jdk17-node20 | 165.232.191.207 | Target node |
Prerequisites
- Jenkins versions must match on both VMs.
- JDK versions must be identical.
- You need
root(or sudo) access on both machines.
If the Jenkins or JDK versions differ, you risk plugin incompatibilities or startup failures.
Always verify versions before proceeding.
Always verify versions before proceeding.
1. Archive Jenkins on the Source Node
1.1 Connect via SSH
1.2 Verify the Jenkins Home Directory
You should see
jenkins owned by the jenkins user with proper read/write permissions.1.3 Stop and Disable Jenkins
1.4 Create a Compressed Backup
1.5 Confirm the Backup
2. Copy the Backup to the Target Node
Usescp to securely transfer the backup file:
3. Prepare the Target Node
3.1 SSH into the Target
3.2 Inspect Current Jenkins Status
On fresh installs, Jenkins displays a “Getting Started” page and prompts for an initial admin password. Retrieve it from:
3.3 Stop and Disable Jenkins
3.4 Deploy the Backup
3.5 (Optional) Backup Existing Jenkins Directory
3.6 Extract and Set Permissions
4. Start Jenkins on the Target Node
4.1 Enable and Launch the Service
4.2 Verify the Service
http://165.232.191.207:8080. You should see your familiar Jenkins dashboard with all jobs, credentials, and plugins intact. Congratulations, your Jenkins controller has been successfully migrated!