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

thinBackup is expecting everything in the jobs folder to be a directory

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: thinbackup-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.500 linux x64
    • Similar Issues:

      Description

      If you have any non-dir files in the jobs folder, thinBackup only backs up a few folders then fails at HudsonBackup.java line 240 resulting in data loss.

      To Reproduce ... create a txt file in the jobs folder....modify a few jobs so their timestamp is later....take a backup.

        Attachments

          Activity

          Hide
          paulca Paul Carr added a comment -

          This is an urgent problem, if anyone has accidentally placed a txt file in their jobs folder, their backups from that point on will be broken, and they will not know it until they try to restore !

          Show
          paulca Paul Carr added a comment - This is an urgent problem, if anyone has accidentally placed a txt file in their jobs folder, their backups from that point on will be broken, and they will not know it until they try to restore !
          Show
          tofuatjava Thomas Fürer added a comment - https://issues.jenkins-ci.org/browse/JENKINS-16426
          Hide
          tofuatjava Thomas Fürer added a comment -

          Hi paul,
          please look at the already fixed issue. if it is okay for you how I fixed it I would release a new version shortly.

          Show
          tofuatjava Thomas Fürer added a comment - Hi paul, please look at the already fixed issue. if it is okay for you how I fixed it I would release a new version shortly.
          Hide
          paulca Paul Carr added a comment -

          Hi Thomas, I think the plugin should handle the situation where there is a file in the jobs folder...instead of all dirs. I was just grepping all the jobs for a particular string, and redirected the output to a file. Left the file in the jobs folder by accident and this resulted in only partial backups for the past month ! Can you not just catch the Exception thrown at HudsonBackup:240 and continue backing up the rest of the directories ?

          Show
          paulca Paul Carr added a comment - Hi Thomas, I think the plugin should handle the situation where there is a file in the jobs folder...instead of all dirs. I was just grepping all the jobs for a particular string, and redirected the output to a file. Left the file in the jobs folder by accident and this resulted in only partial backups for the past month ! Can you not just catch the Exception thrown at HudsonBackup:240 and continue backing up the rest of the directories ?
          Hide
          paulca Paul Carr added a comment -

          Apologies Thomas, From reading the comments on the duplicate I thought you were recommending moving files from the jobs dir, but I just looked at the code on github and realise you are checking it is a directory before backing up.....which is perfect.

          How long till release ?

          Show
          paulca Paul Carr added a comment - Apologies Thomas, From reading the comments on the duplicate I thought you were recommending moving files from the jobs dir, but I just looked at the code on github and realise you are checking it is a directory before backing up.....which is perfect. How long till release ?
          Hide
          tofuatjava Thomas Fürer added a comment -

          just released version 1.7.2

          Show
          tofuatjava Thomas Fürer added a comment - just released version 1.7.2

            People

            • Assignee:
              tofuatjava Thomas Fürer
              Reporter:
              paulca Paul Carr
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: