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

Add scheduling to backup plugin

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: backup-plugin
    • Labels:
      None
    • Environment:
      Any
    • Similar Issues:

      Description

      I guess it would be very useful to have the possibility to schedule the backup task inside the backup plugin. Probably it is possible to use the hudson scheduler like any other job.

        Attachments

          Activity

          Hide
          jeremydavidson jeremydavidson added a comment -

          I've attached a patch for the 1.5 source which provides a possible solution to this problem. All this does is adds a build step that can be added to jobs, which can then be scheduled. I also slightly rearranged BackupLink.java to this end.

          I don't know if this is the best solution, as I haven't thought too much about it, nor do I know if I went about it properly. I just needed this functionality, and no one else appeared to be working on it, so I threw it together.

          As far as I can tell, it works. There are a couple areas I can see room for improvement:

          1. Wait for the backup to complete before allowing the job to finish. Right now, the build step just starts the backup (like clicking the link on the Manage Hudson page), and if there's nothing else in the job, the build will be marked a success and finished. It's debatable, but I think I'd prefer it to wait.

          2. Output the same log from the backup page to the build log. I'm just dumping a couple quick messages, which, in the end, aren't very helpful, but they do get the job done. I think that combined with #1, automatic backups would be plenty intuitive and flexible.

          Show
          jeremydavidson jeremydavidson added a comment - I've attached a patch for the 1.5 source which provides a possible solution to this problem. All this does is adds a build step that can be added to jobs, which can then be scheduled. I also slightly rearranged BackupLink.java to this end. I don't know if this is the best solution, as I haven't thought too much about it, nor do I know if I went about it properly. I just needed this functionality, and no one else appeared to be working on it, so I threw it together. As far as I can tell, it works. There are a couple areas I can see room for improvement: 1. Wait for the backup to complete before allowing the job to finish. Right now, the build step just starts the backup (like clicking the link on the Manage Hudson page), and if there's nothing else in the job, the build will be marked a success and finished. It's debatable, but I think I'd prefer it to wait. 2. Output the same log from the backup page to the build log. I'm just dumping a couple quick messages, which, in the end, aren't very helpful, but they do get the job done. I think that combined with #1, automatic backups would be plenty intuitive and flexible.
          Hide
          rseguy Romain Seguy added a comment -

          Thanks for the submission. I'm not sure having a builder to automatically trigger backup is the best solution we can have. What about using the AdministrativeMonitor extension to do that?

          Show
          rseguy Romain Seguy added a comment - Thanks for the submission. I'm not sure having a builder to automatically trigger backup is the best solution we can have. What about using the AdministrativeMonitor extension to do that?
          Hide
          dp_godwin dp added a comment -

          As part of this issue, would it be possible to flag a failed backup somehow? A red/amber/green ball in the sidebar perhaps?

          With a manual backup you can check immediately that the backup has worked. But with (e.g.) a nightly backup you don't want to check the backup manually every day.

          It would also be handy to be able to keep logs for the backup for a configurable number of days in the past (in case the problem isn't spotted immediately, e.g. on a weekend).

          Show
          dp_godwin dp added a comment - As part of this issue, would it be possible to flag a failed backup somehow? A red/amber/green ball in the sidebar perhaps? With a manual backup you can check immediately that the backup has worked. But with (e.g.) a nightly backup you don't want to check the backup manually every day. It would also be handy to be able to keep logs for the backup for a configurable number of days in the past (in case the problem isn't spotted immediately, e.g. on a weekend).

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mambu Marco Ambu
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: