我在远程Debian 7.8上使用Jenkins.我想将Debian 7.8更新为8.7.我试图更新,但它很好,但Jenkins坏了,无法启动服务.我尝试了一切,但可以找到任何解决方案最后我使用了purged命令,它删除了以前的配置和构建.
现在我恢复服务器并希望再次更新,但我想要一个完整的Jenkins备份配置和构建,以便从最后运行的实例恢复它.
备份配置的最佳实践是尽可能简单(减少工作量和问题),然后配置然后合并备份文件.
我必须备份哪些数据/配置文件?
最佳答案 Jenkins使用的确切布局由 JENKINS_HOME directory描述
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)
+- workspace (working directory for the version control system)
+- [JOBNAME] (sub directory for each job)
+- jobs
+- [JOBNAME] (sub directory for each job)
+- config.xml (job configuration file)
+- latest (symbolic link to the last successful build)
+- builds
+- [BUILD_ID] (for each build)
+- build.xml (build result summary)
+- log (log file)
+- changelog.xml (change log)
它带有一个简单的指令:
All the settings, build logs, artifact archives are stored under the
JENKINS_HOME
directory. Simply archive this directory to make a back up.Back ups can be taken without stopping the server, but when you restore, please do stop the server.