Additionally, this causes ThinBackup to not delete backups set ("Max number of backup sets" option ignored). This filled our build server disks (40 GB of ThinBackup logs).
That is, we have set limited number of backups set to be kept. But it seems the backup sets are not deleted. When I click "Backup Now", a new backup folder is created (for example "FULL-2018-03-02_09-26"), but old folders are not deleted. In Jenkins logs I can see following:
Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path '/tmp/jenkins_backup'. java.io.FileNotFoundException: /var/lib/jenkins/jobs/Reference Tests - Run Defragmentation/lastSuccessful (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:1138) at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1428) at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1426) at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1426) at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1389) at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1310) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupAdditionalFiles(HudsonBackup.java:289) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:171) at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:89) at org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink$1.execute(ThinBackupMgmtLink.java:76) at org.jvnet.hudson.plugins.thinbackup.hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:53) at java.lang.Thread.run(Thread.java:748)
The "/var/lib/jenkins/jobs/Reference Tests - Run Defragmentation/lastSuccessful" is a link to non-existing file (because the job was not run yet, or simply the builds were deleted).
After deleting all links to non-existing files, running ThinBackup didn't result in any exceptions in Jenkins log, and old backup sets were deleted ("Max number of backup sets" honored).
Also, it looks like the created backup is not complete (backup process stops when exception is thrown?)
Due to this, I am increasing priority to Critical, as backup process is unreliable, and the broken links are common / normal in jenkins.