Status: Resolved (View Workflow)
Jenkins LTS 2.303.2
Thin Backup Plugin 1.10
We see failing backups with the plugin with the following log message:
2021-12-20 01:20:22.584+0000 [id=2126208] SEVERE o.j.h.p.t.ThinBackupPeriodicWork#backupNow: Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path '/var/lib/jenkins/BACKUP'. java.io.FileNotFoundException: Source '/var/lib/jenkins/jobs/dirlevel1/jobs/dirlevel2/config.xml' does not exist at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1074) at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1038) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobsDirectory(HudsonBackup.java:227) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobsDirectory(HudsonBackup.java:228) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobs(HudsonBackup.java:209) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:168) at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:89) at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.execute(ThinBackupPeriodicWork.java:66) at org.jvnet.hudson.plugins.thinbackup.hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:53) at java.lang.Thread.run(Thread.java:748)
(The path to the missing file has been anonymized)
The plugin expects the config.xml in a location where it doesn't exist. This is due to assumptions which are done in the plugin code and it seems those assumptions do not fit.
The error also shows that some other plugins do not clean up properly as in the current case we had left over folders from a former pipeline (or multibranch pipeline) job. Those folders should have been deleted by the Jenkins logic once the user triggers the deletion or move, but seems to be buggy.
Anyway, the plugin should be careful with trying to copy things which probably do not exist.
I am gonna prepare a PR to alleviate this problem.
- is related to
JENKINS-12098 FileNotFoundException causes backup process to terminate
JENKINS-65516 The backup archive folders are not getting deleted following retention. The max number of backup sets is 4 but we have backup folders for last 6 months stored in backup folder
- links to
|Field||Original Value||New Value|
This issue is related to
|Link||This issue is related to JENKINS-65516 [ JENKINS-65516 ]|
|Status||Open [ 1 ]||In Progress [ 3 ]|
|Assignee||Thomas Fürer [ tofuatjava ]||Stephan Krull [ krulls ]|
|Remote Link||This issue links to "https://github.com/jenkinsci/thin-backup-plugin/pull/33 (Web Link)" [ 27322 ]|
|Resolution||Fixed [ 1 ]|
|Status||In Progress [ 3 ]||Fixed but Unreleased [ 10203 ]|
|Status||Fixed but Unreleased [ 10203 ]||Resolved [ 5 ]|