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

[backup] Allow configuration of custom exclusions



    • Patch
    • Resolution: Fixed
    • Major
    • backup-plugin
    • None


      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.




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