1

I need to move Jenkins version 2.32 from Server A to Jenkins 2.72.1 Server B. Both server have ubuntu 16.04.3 I could not install any plugin and take back up in Server A due to memory issues. Is there any way that I could achieve this?

Saranya Unni
  • 133
  • 2
  • 12
  • 1
    Possible duplicate of [How to move Jenkins from one PC to another?](https://stackoverflow.com/questions/8724939/how-to-move-jenkins-from-one-pc-to-another) – Cédric Julien Sep 21 '17 at 13:50

2 Answers2

3
  1. Copy all the files in your JENKINS_HOME directory over to the new server.
  2. Point JENKINS_HOME on the new server at the new directory.
  3. Copy the Jenkins war file (or your servlet container setup if you have one) over to the new machine and start it up.

All Jenkins settings, jobs, plugins, config, etc. live in JENKINS_HOME. You just need a copy of it to start it elsewhere.

Javier C.
  • 6,011
  • 4
  • 33
  • 46
Rob Hales
  • 4,330
  • 1
  • 15
  • 29
  • Will it not affect because I am using the latest version of my destination jenkins when compared to my source jenkins – Saranya Unni Sep 21 '17 at 05:15
  • I have yet to run into any issues with a Jenkins upgrade. As long as the version on the new machine is a newer version, when Jenkins starts, it will make any changes it needs to and chances are, it will go perfectly smooth. This is even the process to upgrade from Jenkins 1.x to 2.x, and it worked without a hitch for me on several Jenkins instances. – Rob Hales Sep 21 '17 at 05:34
  • @SaranyaUnni, were you able to successfully copy Jenkins from one machine to another? – Geo Thomas Jan 02 '20 at 17:46
  • The problem I have with this mode of moving Jenkins is that I cannot login at the other side, even after avoiding to move over secret.key, secret.key.not-so-secret and identity.key.enc. Is there a way moving Jenkins so that secrets and auth are not lost? or am I missing another file to avoid moving? – pablacious Mar 10 '20 at 09:19
0

Following JENKINS/Administering+Jenkins, you still need to make a backup of JENKINS_HOME.

See also How to Migrate a Jenkins Job to New Jenkins Server

If you want to exclude the plugins for space issue, you can list them in a text file, and reload them with a groovy script.

Dave Anderson
  • 10,953
  • 2
  • 54
  • 76
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • I have followed [How to Migrate a Jenkins Job to New Jenkins Server](https://staxmanade.com/2015/01/how-to-migrate-a-jenkins-job-to-new-jenkins-server/) to copy jobs alone. But i need entire configuration of old jenkins – Saranya Unni Sep 21 '17 at 05:13
  • @SaranyaUnni Isn't that configuratio entirely in JENKINS_HOME? – VonC Sep 21 '17 at 06:10
  • @SaranyaUnni So my answer was valid, then? – VonC Oct 16 '17 at 12:11