jenkins the definitive guide

(Jeff_L) #1

This plugin lets you configure and run backups of both your build job configurations and your build
history. The Setup screen gives you a large degree of control over exactly what you want backed up
(see Figure 13.11, “Configuring the Jenkins Backup Manager”). You can opt to only back up the XML
configuration files, or back up both the configuration files and the build history. You can also choose
to backup (or not to backup) the automatically-generated Maven artifacts (in many build processes,
these will be available on your local Enterprise Repository Manager). You can also back up the job
workspaces (typically unnecessary, as we discussed above) and any generated fingerprints.


Figure 13.11. Configuring the Jenkins Backup Manager


You can trigger a backup manually from the Backup Manager screen (which you can access from the
Manage Jenkins screen). The backup takes some time, and will shut down Jenkins during the process
(unless you deactivate this option in the backup configuration).


At the time of writing, there is no way to schedule this operation from within Jenkins, but you can start
the backup operation externally by invoking the corresponding URL (e.g., http://localhost:8080/backup/
backup if your Jenkins instance is running locally on port 8080). In a unix environment, for example,
this would typically be scheduled as a cron job using a tool like wget or curl to start the backup.


13.4.3. More Lightweight Automated Backups


If all you want to back up is your build job configuration, the Backup Manager plugin might be
considered overkill. Another option is to use the Thin Backup plugin, which lets you schedule full and
incremental backups of your configuration files. Because they don’t save your build history or artifacts,
these backups are very fast, and there is no need to shut down the server to do them.


Like the Backup plugin, this plugin adds an icon to the Jenkins System Configuration page. From here,
you can configure and schedule your configuration backups, force an immediate backup, or restore your

Free download pdf