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

full backups are saving symlink as directories, lead to incorrect installation when restored

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: periodicbackup-plugin
    • Labels:
      None
    • Environment:
      Windows Server 2008 R2 SP1, Jenkins 1.592, Periodic Backup plugin 1.3
    • Similar Issues:

      Description

      Hi.

      Am using periodic backup plugin to do full backup of our Jenkins installation on Windows. The symlink files (lastBuild, last SucessfulBuild, last FailedBuild etc), get saved as directories in the backup .zip file, and restored that way. These directories then cause errors in subsequent builds as Jenkins goes to update the symlinks and can't since they are directories.

      ln builds\lastSuccessfulBuild C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful failed
      hudson.util.jna.WinIOException: Failed to create a symlink C:\Users\build_user\.jenkins\jobs\Disk_Monitor\lastSuccessful to builds\lastSuccessfulBuild error=183:Cannot create a file when that file already exists
      at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:93)
      at hudson.Util.createSymlink(Util.java:1132)
      at hudson.model.Run.createSymlink(Run.java:1865)
      at hudson.model.Run.updateSymlinks(Run.java:1846)
      at hudson.model.Run.execute(Run.java:1757)
      at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
      at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)

      The plugin should try to save these symlinks and restore them properly.

      Related: JENKINS-18924. https://issues.jenkins-ci.org/browse/JENKINS-18924

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rickybobpat Rick Patterson
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: