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

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

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • thinbackup-plugin
    • None
    • Jenkins 1.500 linux x64

      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.

          [JENKINS-16897] thinBackup is expecting everything in the jobs folder to be a directory

          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 !

          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 !

          Thomas Fürer added a comment -

          Thomas Fürer added a comment - https://issues.jenkins-ci.org/browse/JENKINS-16426

          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.

          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.

          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 ?

          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 ?

          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 ?

          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 ?

          Thomas Fürer added a comment -

          just released version 1.7.2

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

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

              Created:
              Updated:
              Resolved: