Downgrade the Jenkins to a lower version

  • Read

Several weeks ago, One of our guys pressed the 'Upgrade' button of Jenkins, and after that it could not work any more.

Of course he should not do this as he totally did not know the result, while I also found I could not find a suitable snapshot of this VM, and the last one was created in last month.

It is my fault that I had not created the VM snapshots regularly. We could restore the last snapshot while we would lost all the changes after it. To make up my fault, I said to myself I must restore Jenkins with all the later changes.

I reviewed the directories and files under /var/lib/jenkins carefully, and decided to exclude jobs and workspace folders as they should be project files, and also exclude plugins folder as I would overwrite it. I chose a file as reference with timestamp just before the 'Upgrade' button was pressed, and run below command to get all the changed files.

find . \( -path ./workspace -o -path ./jobs -o -path ./plugins \) -prune -o -cnewer jenkins-jobs/

The list was long and included below folders or files:


Then I compared them with the files restored using last snapshot, and finally restored below files:

./config.yml (need to be modified to include all the later project information)

And also restored the /usr/lib/jenkins/jenkins.war to previous version.

Then I restarted the jenkins service and it works well with all the later changes!

I hope such things will never happen again, so I will create a schedule to backup the VM according to our backup policy.

  • by Published on 08/08/2023 13:38:57
  • Repost please keep this link:


Anonymous Write

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: