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

backupBuildsToKeepOnly ignored for job under a folder

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • thinbackup-plugin
    • None
    • 2.414.2, ThinBackup 2.0

      ThinBackup includes build archives of all builds despite activation of the backupBuildsToKeepOnly option for jobs that are not at the root of Jenkins but nested in a folder (using Folders plugin).

      If it may help, I suspect an issue in ‎HudsonBackup::backupBuildsFor where hudson.getItem is used whereas I would expect usage of the getItemByFullName method.

      Configuration

      <?xml version='1.1' encoding='UTF-8'?>
      <org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl plugin="thinBackup@2.0">
        <fullBackupSchedule>H 23 * * 1</fullBackupSchedule>
        <diffBackupSchedule>H 23 * * 2-5</diffBackupSchedule>
        <backupPath>/var/lib/jenkins/ThinBackup</backupPath>
        <nrMaxStoredFull>5</nrMaxStoredFull>
        <excludedFilesRegex></excludedFilesRegex>
        <waitForIdle>true</waitForIdle>
        <forceQuietModeTimeout>-1</forceQuietModeTimeout>
        <cleanupDiff>false</cleanupDiff>
        <moveOldBackupsToZipFile>true</moveOldBackupsToZipFile>
        <backupBuildResults>true</backupBuildResults>
        <backupBuildArchive>true</backupBuildArchive>
        <backupPluginArchives>false</backupPluginArchives>
        <backupUserContents>true</backupUserContents>
        <backupConfigHistory>true</backupConfigHistory>
        <backupAdditionalFiles>false</backupAdditionalFiles>
        <backupAdditionalFilesRegex></backupAdditionalFilesRegex>
        <backupNextBuildNumber>false</backupNextBuildNumber>
        <backupBuildsToKeepOnly>true</backupBuildsToKeepOnly>
        <failFast>true</failFast>
      </org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl>
      

          [JENKINS-73233] backupBuildsToKeepOnly ignored for job under a folder

          Jonathan Delizy created issue -
          Jonathan Delizy made changes -
          Environment Original: 2.414.2, ThinBackup 2.0

          Configuration
          {code}
          <?xml version='1.1' encoding='UTF-8'?>
          <org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl plugin="thinBackup@2.0">
            <fullBackupSchedule>H 23 * * 1</fullBackupSchedule>
            <diffBackupSchedule>H 23 * * 2-5</diffBackupSchedule>
            <backupPath>/var/lib/jenkins/ThinBackup</backupPath>
            <nrMaxStoredFull>5</nrMaxStoredFull>
            <excludedFilesRegex></excludedFilesRegex>
            <waitForIdle>true</waitForIdle>
            <forceQuietModeTimeout>-1</forceQuietModeTimeout>
            <cleanupDiff>false</cleanupDiff>
            <moveOldBackupsToZipFile>true</moveOldBackupsToZipFile>
            <backupBuildResults>true</backupBuildResults>
            <backupBuildArchive>false</backupBuildArchive>
            <backupPluginArchives>false</backupPluginArchives>
            <backupUserContents>true</backupUserContents>
            <backupConfigHistory>true</backupConfigHistory>
            <backupAdditionalFiles>false</backupAdditionalFiles>
            <backupAdditionalFilesRegex></backupAdditionalFilesRegex>
            <backupNextBuildNumber>false</backupNextBuildNumber>
            <backupBuildsToKeepOnly>true</backupBuildsToKeepOnly>
            <failFast>true</failFast>
          </org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl>
          {code}
          New: 2.414.2, ThinBackup 2.0

          Configuration
          <?xml version='1.1' encoding='UTF-8'?>
          <org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl plugin="thinBackup@2.0">
            <fullBackupSchedule>H 23 * * 1</fullBackupSchedule>
            <diffBackupSchedule>H 23 * * 2-5</diffBackupSchedule>
            <backupPath>/var/lib/jenkins/ThinBackup</backupPath>
            <nrMaxStoredFull>5</nrMaxStoredFull>
            <excludedFilesRegex></excludedFilesRegex>
            <waitForIdle>true</waitForIdle>
            <forceQuietModeTimeout>-1</forceQuietModeTimeout>
            <cleanupDiff>false</cleanupDiff>
            <moveOldBackupsToZipFile>true</moveOldBackupsToZipFile>
            <backupBuildResults>true</backupBuildResults>
            <backupBuildArchive>false</backupBuildArchive>
            <backupPluginArchives>false</backupPluginArchives>
            <backupUserContents>true</backupUserContents>
            <backupConfigHistory>true</backupConfigHistory>
            <backupAdditionalFiles>false</backupAdditionalFiles>
            <backupAdditionalFilesRegex></backupAdditionalFilesRegex>
            <backupNextBuildNumber>false</backupNextBuildNumber>
            <backupBuildsToKeepOnly>true</backupBuildsToKeepOnly>
            <failFast>true</failFast>
          </org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl>
          Jonathan Delizy made changes -
          Environment Original: 2.414.2, ThinBackup 2.0

          Configuration
          <?xml version='1.1' encoding='UTF-8'?>
          <org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl plugin="thinBackup@2.0">
            <fullBackupSchedule>H 23 * * 1</fullBackupSchedule>
            <diffBackupSchedule>H 23 * * 2-5</diffBackupSchedule>
            <backupPath>/var/lib/jenkins/ThinBackup</backupPath>
            <nrMaxStoredFull>5</nrMaxStoredFull>
            <excludedFilesRegex></excludedFilesRegex>
            <waitForIdle>true</waitForIdle>
            <forceQuietModeTimeout>-1</forceQuietModeTimeout>
            <cleanupDiff>false</cleanupDiff>
            <moveOldBackupsToZipFile>true</moveOldBackupsToZipFile>
            <backupBuildResults>true</backupBuildResults>
            <backupBuildArchive>false</backupBuildArchive>
            <backupPluginArchives>false</backupPluginArchives>
            <backupUserContents>true</backupUserContents>
            <backupConfigHistory>true</backupConfigHistory>
            <backupAdditionalFiles>false</backupAdditionalFiles>
            <backupAdditionalFilesRegex></backupAdditionalFilesRegex>
            <backupNextBuildNumber>false</backupNextBuildNumber>
            <backupBuildsToKeepOnly>true</backupBuildsToKeepOnly>
            <failFast>true</failFast>
          </org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl>
          New: 2.414.2, ThinBackup 2.0
          Jonathan Delizy made changes -
          Description Original: ThinBackup includes build archives of all builds despite activation of the {{backupBuildsToKeepOnly}} option for jobs that are not at the root of Jenkins but nested in a folder (using [Folders|https://plugins.jenkins.io/cloudbees-folder/] plugin).

          If it may help, I suspect an issue in {{‎HudsonBackup::backupBuildsFor}} where {{hudson.getItem}} is used whereas I would expect usage of the {{getItemByFullName}} method.
          New: ThinBackup includes build archives of all builds despite activation of the {{backupBuildsToKeepOnly}} option for jobs that are not at the root of Jenkins but nested in a folder (using [Folders|https://plugins.jenkins.io/cloudbees-folder/] plugin).

          If it may help, I suspect an issue in {{‎HudsonBackup::backupBuildsFor}} where {{hudson.getItem}} is used whereas I would expect usage of the {{getItemByFullName}} method.

          h3. Configuration
          {code}
          <?xml version='1.1' encoding='UTF-8'?>
          <org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl plugin="thinBackup@2.0">
            <fullBackupSchedule>H 23 * * 1</fullBackupSchedule>
            <diffBackupSchedule>H 23 * * 2-5</diffBackupSchedule>
            <backupPath>/var/lib/jenkins/ThinBackup</backupPath>
            <nrMaxStoredFull>5</nrMaxStoredFull>
            <excludedFilesRegex></excludedFilesRegex>
            <waitForIdle>true</waitForIdle>
            <forceQuietModeTimeout>-1</forceQuietModeTimeout>
            <cleanupDiff>false</cleanupDiff>
            <moveOldBackupsToZipFile>true</moveOldBackupsToZipFile>
            <backupBuildResults>true</backupBuildResults>
            <backupBuildArchive>false</backupBuildArchive>
            <backupPluginArchives>false</backupPluginArchives>
            <backupUserContents>true</backupUserContents>
            <backupConfigHistory>true</backupConfigHistory>
            <backupAdditionalFiles>false</backupAdditionalFiles>
            <backupAdditionalFilesRegex></backupAdditionalFilesRegex>
            <backupNextBuildNumber>false</backupNextBuildNumber>
            <backupBuildsToKeepOnly>true</backupBuildsToKeepOnly>
            <failFast>true</failFast>
          </org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl>
          {code}
          Jonathan Delizy made changes -
          Description Original: ThinBackup includes build archives of all builds despite activation of the {{backupBuildsToKeepOnly}} option for jobs that are not at the root of Jenkins but nested in a folder (using [Folders|https://plugins.jenkins.io/cloudbees-folder/] plugin).

          If it may help, I suspect an issue in {{‎HudsonBackup::backupBuildsFor}} where {{hudson.getItem}} is used whereas I would expect usage of the {{getItemByFullName}} method.

          h3. Configuration
          {code}
          <?xml version='1.1' encoding='UTF-8'?>
          <org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl plugin="thinBackup@2.0">
            <fullBackupSchedule>H 23 * * 1</fullBackupSchedule>
            <diffBackupSchedule>H 23 * * 2-5</diffBackupSchedule>
            <backupPath>/var/lib/jenkins/ThinBackup</backupPath>
            <nrMaxStoredFull>5</nrMaxStoredFull>
            <excludedFilesRegex></excludedFilesRegex>
            <waitForIdle>true</waitForIdle>
            <forceQuietModeTimeout>-1</forceQuietModeTimeout>
            <cleanupDiff>false</cleanupDiff>
            <moveOldBackupsToZipFile>true</moveOldBackupsToZipFile>
            <backupBuildResults>true</backupBuildResults>
            <backupBuildArchive>false</backupBuildArchive>
            <backupPluginArchives>false</backupPluginArchives>
            <backupUserContents>true</backupUserContents>
            <backupConfigHistory>true</backupConfigHistory>
            <backupAdditionalFiles>false</backupAdditionalFiles>
            <backupAdditionalFilesRegex></backupAdditionalFilesRegex>
            <backupNextBuildNumber>false</backupNextBuildNumber>
            <backupBuildsToKeepOnly>true</backupBuildsToKeepOnly>
            <failFast>true</failFast>
          </org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl>
          {code}
          New: ThinBackup includes build archives of all builds despite activation of the {{backupBuildsToKeepOnly}} option for jobs that are not at the root of Jenkins but nested in a folder (using [Folders|https://plugins.jenkins.io/cloudbees-folder/] plugin).

          If it may help, I suspect an issue in {{‎HudsonBackup::backupBuildsFor}} where {{hudson.getItem}} is used whereas I would expect usage of the {{getItemByFullName}} method.

          h3. Configuration
          {code}
          <?xml version='1.1' encoding='UTF-8'?>
          <org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl plugin="thinBackup@2.0">
            <fullBackupSchedule>H 23 * * 1</fullBackupSchedule>
            <diffBackupSchedule>H 23 * * 2-5</diffBackupSchedule>
            <backupPath>/var/lib/jenkins/ThinBackup</backupPath>
            <nrMaxStoredFull>5</nrMaxStoredFull>
            <excludedFilesRegex></excludedFilesRegex>
            <waitForIdle>true</waitForIdle>
            <forceQuietModeTimeout>-1</forceQuietModeTimeout>
            <cleanupDiff>false</cleanupDiff>
            <moveOldBackupsToZipFile>true</moveOldBackupsToZipFile>
            <backupBuildResults>true</backupBuildResults>
            <backupBuildArchive>true</backupBuildArchive>
            <backupPluginArchives>false</backupPluginArchives>
            <backupUserContents>true</backupUserContents>
            <backupConfigHistory>true</backupConfigHistory>
            <backupAdditionalFiles>false</backupAdditionalFiles>
            <backupAdditionalFilesRegex></backupAdditionalFilesRegex>
            <backupNextBuildNumber>false</backupNextBuildNumber>
            <backupBuildsToKeepOnly>true</backupBuildsToKeepOnly>
            <failFast>true</failFast>
          </org.jvnet.hudson.plugins.thinbackup.ThinBackupPluginImpl>
          {code}

            tofuatjava Thomas Fürer
            jonathand131 Jonathan Delizy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: