Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17475

Backup stops when processing some file like 'latestfailedbuild'

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Blocker Blocker
    • thinbackup-plugin
    • None
    • Jenkins since 1.507 (reproduced on 1.509)
      thinBackup 1.7.2

      03.04.2013 09:13:04 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow
      SCHWERWIEGEND: Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path 'C:\CIServer\Backup\'.
      java.io.IOException: Source 'C:\Program Files (x86)\Jenkins\jobs\Bank Trunk\builds\lastFailedBuild' exists but is not a directory
      at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:869)
      at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:814)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupBuildFiles(HudsonBackup.java:302)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupBuildsFor(HudsonBackup.java:270)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJob(HudsonBackup.java:208)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobsDirectory(HudsonBackup.java:196)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupJobs(HudsonBackup.java:175)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:142)
      at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:87)
      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:54)
      at java.lang.Thread.run(Unknown Source)

      03.04.2013 09:12:40 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup backupJobsDirectory
      INFO: Found 63 jobs to back up.

      03.04.2013 09:12:40 org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink doBackupManual
      INFO: Starting manual backup.

      Indeed, lastFailedBuild is a normal file and not a directory. Since Jenkins 1.507 there are these special files (see http://jenkins-ci.org/changelog). Do you think you can address this issue quickly?

          [JENKINS-17475] Backup stops when processing some file like 'latestfailedbuild'

          Code changed in jenkins
          User: tofuatjava
          Path:
          src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
          http://jenkins-ci.org/commit/thin-backup-plugin/c49ec558b504f996c400d68e419250fcc573401f
          Log:
          JENKINS-17475: ignore symlinks for backup, as a quickfix; symlinks need
          to be in backup, otherwise jenkins creates dead links for last*build and
          this causes duplications in the build history for jobs

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tofuatjava Path: src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java http://jenkins-ci.org/commit/thin-backup-plugin/c49ec558b504f996c400d68e419250fcc573401f Log: JENKINS-17475 : ignore symlinks for backup, as a quickfix; symlinks need to be in backup, otherwise jenkins creates dead links for last*build and this causes duplications in the build history for jobs

          Thomas Fürer added a comment -

          just released 1.7.3, which ignores the symlinks for now; this will result in some unnormal situations for the job history aslong no new build is done. I will try to fix this as soon I have a solution for all the symlink problems with java 1.6 and the different operating systems. I found a lot of different behaivors by changing the jenkins version, the JRE jenkins runs with, and of course the operating system.

          Thomas Fürer added a comment - just released 1.7.3, which ignores the symlinks for now; this will result in some unnormal situations for the job history aslong no new build is done. I will try to fix this as soon I have a solution for all the symlink problems with java 1.6 and the different operating systems. I found a lot of different behaivors by changing the jenkins version, the JRE jenkins runs with, and of course the operating system.

          Daniel Beck added a comment -

          Why is this labeled LTS? There doesn't seem to be anything to be changed in core.

          Daniel Beck added a comment - Why is this labeled LTS? There doesn't seem to be anything to be changed in core.

          Sarah Woodall added a comment -

          I requested this to be fixed in LTS because of the comment in the changelog of the Thin Backup plugin, where it says "Upgrade Jenkins core version to 1.510, verions before this are not tested and midge be buggy." (sic). Unfortunately the LTS release branch is based on core version 1.509. I suppose the comment means that some bug was fixed in the core between 1.509 and 1.510 that makes the plugin work properly with 1.510. So I am asking that THAT bugfix, whatever it is, be ported into the LTS core, so that the plugin can be used with the LTS core.

          Sarah Woodall added a comment - I requested this to be fixed in LTS because of the comment in the changelog of the Thin Backup plugin, where it says "Upgrade Jenkins core version to 1.510, verions before this are not tested and midge be buggy." (sic). Unfortunately the LTS release branch is based on core version 1.509. I suppose the comment means that some bug was fixed in the core between 1.509 and 1.510 that makes the plugin work properly with 1.510. So I am asking that THAT bugfix, whatever it is, be ported into the LTS core, so that the plugin can be used with the LTS core.

          Thomas Fürer added a comment -

          for clarification, the minimum version of jenkins is 1.509 so it should not be a big problem with the LTS version. But be aware as I'm a single developer and I'm very busy with other stuff I have not the time to test with every version of jenkins.
          currently I restarted the work for a fix of the root problem, because the original idea of an fix do not work on all systems.

          Thomas Fürer added a comment - for clarification, the minimum version of jenkins is 1.509 so it should not be a big problem with the LTS version. But be aware as I'm a single developer and I'm very busy with other stuff I have not the time to test with every version of jenkins. currently I restarted the work for a fix of the root problem, because the original idea of an fix do not work on all systems.

          Thomas Fürer added a comment -

          FAILURE: Integrated in thinBackup #84
          JENKINS-17475: add check for symlinks (linux) (tfuerer.javanet: e827e1d5f9139c8d11fc53f6dfae53fbe586de93)

          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
            JENKINS-17475: try to backup links introduced with 1.507 also on non (tfuerer.javanet: e1497043218f8f2a9b16061b3a1e187b52426b12)
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupWithCloudBeesFolder.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/utils/TestUtils.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupSet.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/TestThinBackupPeriodicWork.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupZipping.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupMatrixJob.java
          • pom.xml
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestPluginList.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/TestHelper.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestHudsonBackup.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/restore/TestHudsonRestore.java
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
            JENKINS-17475: implement backup for last*build (tfuerer.javanet: 01ccb80bd3dc52b771d36d09a2374e3469b7c93c)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
            JENKINS-17475: ignore symlinks for backup, as a quickfix; symlinks need (tfuerer.javanet: c49ec558b504f996c400d68e419250fcc573401f)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java

          Thomas Fürer added a comment - FAILURE: Integrated in thinBackup #84 JENKINS-17475 : add check for symlinks (linux) (tfuerer.javanet: e827e1d5f9139c8d11fc53f6dfae53fbe586de93 ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java JENKINS-17475 : try to backup links introduced with 1.507 also on non (tfuerer.javanet: e1497043218f8f2a9b16061b3a1e187b52426b12 ) src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupWithCloudBeesFolder.java src/test/java/org/jvnet/hudson/plugins/thinbackup/utils/TestUtils.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupSet.java src/test/java/org/jvnet/hudson/plugins/thinbackup/TestThinBackupPeriodicWork.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupZipping.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupMatrixJob.java pom.xml src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestPluginList.java src/test/java/org/jvnet/hudson/plugins/thinbackup/TestHelper.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestHudsonBackup.java src/test/java/org/jvnet/hudson/plugins/thinbackup/restore/TestHudsonRestore.java src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java JENKINS-17475 : implement backup for last*build (tfuerer.javanet: 01ccb80bd3dc52b771d36d09a2374e3469b7c93c ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java JENKINS-17475 : ignore symlinks for backup, as a quickfix; symlinks need (tfuerer.javanet: c49ec558b504f996c400d68e419250fcc573401f ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java

          Thomas Fürer added a comment -

          FAILURE: Integrated in thinBackup #86
          JENKINS-17475: add new files in the builds folder to the backup archive (tfuerer.javanet: 9dd19dfccf35fb323e9dd34eb7d40ff672f47070)

          • src/main/java/org/jvnet/hudson/plugins/thinbackup/restore/PluginRestoreUpdateCenter.java
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
          • pom.xml
            JENKINS-17475: add check for symlinks (linux) (tfuerer.javanet: e827e1d5f9139c8d11fc53f6dfae53fbe586de93)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
            JENKINS-17475: try to backup links introduced with 1.507 also on non (tfuerer.javanet: e1497043218f8f2a9b16061b3a1e187b52426b12)
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupWithCloudBeesFolder.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/TestThinBackupPeriodicWork.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestHudsonBackup.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupZipping.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupSet.java
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/utils/TestUtils.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/restore/TestHudsonRestore.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupMatrixJob.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/TestHelper.java
          • pom.xml
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestPluginList.java
            JENKINS-17475: implement backup for last*build (tfuerer.javanet: 01ccb80bd3dc52b771d36d09a2374e3469b7c93c)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
            JENKINS-17475: ignore symlinks for backup, as a quickfix; symlinks need (tfuerer.javanet: c49ec558b504f996c400d68e419250fcc573401f)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java

          Thomas Fürer added a comment - FAILURE: Integrated in thinBackup #86 JENKINS-17475 : add new files in the builds folder to the backup archive (tfuerer.javanet: 9dd19dfccf35fb323e9dd34eb7d40ff672f47070 ) src/main/java/org/jvnet/hudson/plugins/thinbackup/restore/PluginRestoreUpdateCenter.java src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java pom.xml JENKINS-17475 : add check for symlinks (linux) (tfuerer.javanet: e827e1d5f9139c8d11fc53f6dfae53fbe586de93 ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java JENKINS-17475 : try to backup links introduced with 1.507 also on non (tfuerer.javanet: e1497043218f8f2a9b16061b3a1e187b52426b12 ) src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupWithCloudBeesFolder.java src/test/java/org/jvnet/hudson/plugins/thinbackup/TestThinBackupPeriodicWork.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestHudsonBackup.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupZipping.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupSet.java src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java src/test/java/org/jvnet/hudson/plugins/thinbackup/utils/TestUtils.java src/test/java/org/jvnet/hudson/plugins/thinbackup/restore/TestHudsonRestore.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupMatrixJob.java src/test/java/org/jvnet/hudson/plugins/thinbackup/TestHelper.java pom.xml src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestPluginList.java JENKINS-17475 : implement backup for last*build (tfuerer.javanet: 01ccb80bd3dc52b771d36d09a2374e3469b7c93c ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java JENKINS-17475 : ignore symlinks for backup, as a quickfix; symlinks need (tfuerer.javanet: c49ec558b504f996c400d68e419250fcc573401f ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java

          Thomas Fürer added a comment -

          UNSTABLE: Integrated in thinBackup #88
          JENKINS-17475: add new files in the builds folder to the backup archive (tfuerer.javanet: 9dd19dfccf35fb323e9dd34eb7d40ff672f47070)

          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/restore/PluginRestoreUpdateCenter.java
          • pom.xml
            JENKINS-17475: add check for symlinks (linux) (tfuerer.javanet: e827e1d5f9139c8d11fc53f6dfae53fbe586de93)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
            JENKINS-17475: try to backup links introduced with 1.507 also on non (tfuerer.javanet: e1497043218f8f2a9b16061b3a1e187b52426b12)
          • pom.xml
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestPluginList.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupWithCloudBeesFolder.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupMatrixJob.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupSet.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/utils/TestUtils.java
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/restore/TestHudsonRestore.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/TestHelper.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestHudsonBackup.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/TestThinBackupPeriodicWork.java
          • src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupZipping.java
            JENKINS-17475: implement backup for last*build (tfuerer.javanet: 01ccb80bd3dc52b771d36d09a2374e3469b7c93c)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
            JENKINS-17475: ignore symlinks for backup, as a quickfix; symlinks need (tfuerer.javanet: c49ec558b504f996c400d68e419250fcc573401f)
          • src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java

          Thomas Fürer added a comment - UNSTABLE: Integrated in thinBackup #88 JENKINS-17475 : add new files in the builds folder to the backup archive (tfuerer.javanet: 9dd19dfccf35fb323e9dd34eb7d40ff672f47070 ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java src/main/java/org/jvnet/hudson/plugins/thinbackup/restore/PluginRestoreUpdateCenter.java pom.xml JENKINS-17475 : add check for symlinks (linux) (tfuerer.javanet: e827e1d5f9139c8d11fc53f6dfae53fbe586de93 ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java JENKINS-17475 : try to backup links introduced with 1.507 also on non (tfuerer.javanet: e1497043218f8f2a9b16061b3a1e187b52426b12 ) pom.xml src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestPluginList.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupWithCloudBeesFolder.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupMatrixJob.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupSet.java src/test/java/org/jvnet/hudson/plugins/thinbackup/utils/TestUtils.java src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java src/test/java/org/jvnet/hudson/plugins/thinbackup/restore/TestHudsonRestore.java src/test/java/org/jvnet/hudson/plugins/thinbackup/TestHelper.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestHudsonBackup.java src/test/java/org/jvnet/hudson/plugins/thinbackup/TestThinBackupPeriodicWork.java src/test/java/org/jvnet/hudson/plugins/thinbackup/backup/TestBackupZipping.java JENKINS-17475 : implement backup for last*build (tfuerer.javanet: 01ccb80bd3dc52b771d36d09a2374e3469b7c93c ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java JENKINS-17475 : ignore symlinks for backup, as a quickfix; symlinks need (tfuerer.javanet: c49ec558b504f996c400d68e419250fcc573401f ) src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java

          Thomas Fürer added a comment -

          since version 1.532 links are recreated from jenkins. there is no need to backup links in this case.

          Thomas Fürer added a comment - since version 1.532 links are recreated from jenkins. there is no need to backup links in this case.

          Daniel Beck added a comment -

          Which change are you referring to? JENKINS-19034 only recreates numeric symlinks (42 -> 2013-10-02_20-46-22), not the last*Build ones.

          Daniel Beck added a comment - Which change are you referring to? JENKINS-19034 only recreates numeric symlinks ( 42 -> 2013-10-02_20-46-22 ), not the last*Build ones.

            tofuatjava Thomas Fürer
            tofuatjava Thomas Fürer
            Votes:
            15 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: