- Jenkins 2.x Continuous Integration Cookbook(Third Edition)
- Mitesh Soni Alan Mark Berg
- 289字
- 2025-02-22 06:51:02
Backing up and restoring Jenkins
A core task for the smooth running of Jenkins is the scheduled backing up of its home directory. This is not necessarily all the artifacts, but is at least its configuration and the history of testing, which plugins will need to make reports.
Backups are not interesting unless you can also restore. There is a wide range of stories on this subject. My favorite (and I won't name the well-known company involved) is that, sometime in the early 70's, a company bought a very expensive piece of software and a tape backup facility to back up all the marketing results being harvested through their mainframes. However, not everything was automated. Every night, a tape needed to be moved into a specific slot. A poorly paid worker was allocated the task. For a year, the worker would professionally fulfill the task. One day, a failure occurred and a backup was required. The backup failed to restore. The reason was that the worker also needed to press the record button every night, but this was not mentioned in the tasks assigned to him. There was a failure to regularly test the restore process. The process failed, not the poorly paid person. Hence, through learning lessons from history, this recipe describes both backup and restore.
Plugins improve aggressively and you may need to update them weekly. Although it is unlikely that the core configuration will change, it is quite likely that extra options will be added, increasing the variables that you input in the GUI. Therefore, the screenshots shown in this book may be slightly different from the most modern version, but the recipes should remain intact.