farmer111 发表于 2018-1-7 13:49:19

Jenkins备份与恢复

  Jenkins的目录结构
  JENKINS_HOME,即为Jenkins的安装目录,可以在Jenkins页面中得到,Jenkins->系统管理->系统设置。
  JENKINS_HOME
  +- config.xml   (jenkins root configuration)
  +- *.xml          (other site-wide configuration files)
  +- userContent    (files in this directory will be served under your http://server/userContent/)
  +- fingerprints   (stores fingerprint records)
  +- plugins      (stores plugins)
  +- jobs
  +-       (sub directory for each job)
  +- config.xml   (job configuration file)
  +- workspace      (working directory for the version control system)
  +- latest         (symbolic link to the last successful build)
  +- builds
  +-    (for each build)
  +- build.xml      (build result summary)
  +- log            (log file)
  +- changelog.xml(change log)
  如果有权限管理,则在HOME目录下还会有users目录。
  其中config.xml是Jenkins重要的配置文件。我们都知道Jenkins用于monitor多个build,而jobs这个目录无疑就是存储每个build相关信息的地方。
  总的来说,Jenkins目录结构非常直白,简洁。
  备份和恢复
  备份和恢复非常简单,就是简单的copy Jenkins的目录就好了:
  All the settings, build logs, artifact archives are stored under the JENKINS_HOME directory. Simply archive this directory to make a back up. Similarly, restoring the data is just replacing the contents of the JENKINS_HOME directory from a back up.
页: [1]
查看完整版本: Jenkins备份与恢复