Skip to main content
In this step-by-step guide, you’ll learn how to migrate your Jenkins controller—including all configurations, plugins, and jobs—from one VM to another. We’ll walk through creating a backup on the source node, transferring it to the target node, and restoring everything so Jenkins comes up with zero data loss.

Environment Overview

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.

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

Use scp 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

Finally, open your browser to 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!

Watch Video