jenkins the definitive guide

(Jeff_L) #1

Jenkins uses the files in this directory extensively to display build history and metrics data, so you should
be particularly careful not to delete any of the build history directories without knowing exactly what
you are doing.


3.14. Backing Up Your Jenkins Data


It is important to ensure that your Jenkins data is regularly backed up. This applies in particular to the
Jenkins home directory, which contains your server configuration details as well as your build artifacts
and build histories. This directory should be backed up frequently and automatically. The Jenkins
executable itself is less critical, as it can easily be reinstalled without affecting your build environment.


3.15. Upgrading Your Jenkins Installation


Upgrading Jenkins is easy—you simply replace your local copy of the jenkins.war file and restart
Jenkins. However you should make sure there are no builds running when you restart your server. Since
your build environment configuration details, plugins, and build history are stored in the Jenkins home
directory, upgrading your Jenkins executable will have no impact on your installation. You can always
check what version of Jenkins you are currently running by referring to the version number in the bottom
right corner of every screen.


If you have installed Jenkins using one of the Linux packages, Jenkins can be upgraded using the same
process as the other system packages on the server.


If you are running Jenkins as a stand-alone instance, you can also upgrade your Jenkins installation
directly from the web interface, in the Manage Jenkins section. Jenkins will indicate if a more recent
version is available, and give you the option to either download it manually or upgrade automatically
(see Figure 3.10, “Upgrading Jenkins from the web interface”).

Free download pdf