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

[backup] Allow configuration of custom exclusions

    XMLWordPrintable

Details

    Description

      We are using the backup plugin successfully, but really what we want is just the job configurations, not the entire Hudson install. So, zipping up the entire plugins and war directories adds tens of megabytes more than we want. Then, we tried adding the "shelve jobs" plugin, and it is incompatible with the backup plugin because it places jobs (with workspaces) under "~/.hudson/shelvedProjects" which all get backed up, adding hundreds of megabytes to the zip.

      So, looking at the source of the backup plugin I noted that the customExclusions tag is persisted, but there isn't anything on the gui to allow you to contribute to it. So, I made the smallest change possible to simply allow the user to provide the names they want to exclude globally. This allows me to set the excludes to "shelvedProjects,plugins,war,updates,userContent" which in a sandbox hudson install literally takes the backup zip from 165MB down to 15KB.

      The downside is that it would (hypothetically) exclude "war" anywhere it sees it, but for me that's okay, and like I said I made the smallest code change possible and stayed within the existing code.

      I will happily apply this patch myself if no one from the backup component has time to do it. But it would of course be good to get your feedback first.

      Attachments

        Activity

          rseguy Romain Seguy added a comment -

          Thanks for the enhancement request and the patch which goes with it. I'll take a look at that tom morning (French-time), will apply the fix and do a release since there are already some bugs waiting for a release too. Thanks.

          rseguy Romain Seguy added a comment - Thanks for the enhancement request and the patch which goes with it. I'll take a look at that tom morning (French-time), will apply the fix and do a release since there are already some bugs waiting for a release too. Thanks.

          Code changed in hudson
          User: : rseguy
          Path:
          trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/BackupConfig.java
          trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/BackupLink.java
          trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/utils/BackupTask.java
          trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/utils/RestoreTask.java
          trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/utils/compress/AbstractUnArchiver.java
          trunk/hudson/plugins/backup/src/main/resources/index.jelly
          trunk/hudson/plugins/backup/src/main/resources/org/jvnet/hudson/plugins/backup/BackupLink/backupsettings.jelly
          trunk/hudson/plugins/backup/src/main/resources/org/jvnet/hudson/plugins/backup/BackupLink/backupsettings.properties
          trunk/hudson/plugins/backup/src/main/webapp/help/help-customExcludes.html
          http://jenkins-ci.org/commit/32412
          Log:
          [FIXED JENKINS-6892]

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : rseguy Path: trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/BackupConfig.java trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/BackupLink.java trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/utils/BackupTask.java trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/utils/RestoreTask.java trunk/hudson/plugins/backup/src/main/java/org/jvnet/hudson/plugins/backup/utils/compress/AbstractUnArchiver.java trunk/hudson/plugins/backup/src/main/resources/index.jelly trunk/hudson/plugins/backup/src/main/resources/org/jvnet/hudson/plugins/backup/BackupLink/backupsettings.jelly trunk/hudson/plugins/backup/src/main/resources/org/jvnet/hudson/plugins/backup/BackupLink/backupsettings.properties trunk/hudson/plugins/backup/src/main/webapp/help/help-customExcludes.html http://jenkins-ci.org/commit/32412 Log: [FIXED JENKINS-6892]
          rseguy Romain Seguy added a comment -

          Delivered in 1.5

          rseguy Romain Seguy added a comment - Delivered in 1.5

          People

            rseguy Romain Seguy
            jacob_robertson Jacob Robertson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: