Child pages
  • Backup Plugin
Skip to end of metadata
Go to start of metadata

View Backup plugin on the plugin site for more information.

This plugin is up for adoption. Want to help improve this plugin? Click here to learn more!

Backup plugin allows archiving and restoring your Jenkins (and Hudson) home directory.

This plugin is searching for a new maintainer!

Unfortunately, the current maintainer has no more time to work on this plugin, but there are still some important issues to fix.
If you want to take ownership of this plugin, just don't hesitate (please mention that on the mailing list).

Want periodic backups?

This plugin requires that you manually start it to back up your data.

For automated periodic backups, check out the thinBackup plugin.

Description

The Backup plugin adds a new Backup manager item in the Manage Jenkins page. This item allows (cf. screenshot below):

  • Tweaking backup settings (using the Setup link)
  • Backuping Jenkins's configuration (using the Backup Jenkins configuration link)
  • Restoring Jenkins's configuration from a previous backup (using the Restore Jenkins configuration link)

Alternatives to this plugin

There are two other alternatives to this plugin:

  • The SCM Sync configuration plugin allows automatically tracking changes brought to the global configuration of Jenkins and to the jobs configuration into a configuration management system (Subversion, etc.).
  • The thinBackup plugin focuses on backuping Jenkins's global configuration and jobs configuration. It also offers a scheduling feature (if you think the efforts on this plugin and the Backup one should be merged, just notify us!).

So pick the one which fits your needs (smile)

Version history

Version 1.6.1 (08/04/2011)

  • Fixed JENKINS-5968: org.codehaus.plexus.archiver.ArchiverException: Failed to read filesystem attributes

Version 1.6 (12/10/2010)

  • Added a new Configuration files (.xml) only option to backup only configuration files.
  • Added a new No shutdown option to trigger backup without shutting down Hudson.
  • Added some icons in the Backup manager screen.
  • Fixed JENKINS-7634: Hudson backup deletes home directory and hangs.

Version 1.5 (07/01/2010)

  • Implemented JENKINS-6892: Allow configuration of custom exclusions
  • Implemented JENKINS-5305: It is no more possible to use tar.gz and tar.bz2 compression formats from Windows anymore.
  • Fixed JENKINS-5929: Some images were not displayed.

Version 1.4.1 (02/21/2010)

  • Help messages fixed

Version 1.4 (02/11/2010)

  • It is now possible to define which files/directories have to saved from jobs' workspaces using a set of Ant includes/excludes patterns (refer to the @includes of Ant fileset for the exact format):

Version 1.3

  • Backup content is now configurable
  • Only one backup in the same time is possible

Version 1.2

  • Maintenance release to remove a redirection problem on settings form submission when hudson is not the ROOT application (on http://myserver/hudson urls)

Version 1.1

  • Backup should run in the higher security privilege (report)
  • Tar formats supported
  • Configuration section
  • File to restore selection

Version 1.0 (04/10/2009)

  • Initial realease including manual file selection and ZIP format

17 Comments

  1. Thanks for providing this plugin.

    I'm running 1.3 and get an error when I try to backup to a mapped drive:

    [ INFO] Full backup file name : H:\HudsonBackup\backup_20091125_1202.zip
    ERROR org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: H:\HudsonBackup\backup_20091125_1202.zip (The system cannot find the path specified) (and the archive is probably corrupt but I could not delete it)
    org.jvnet.hudson.plugins.backup.BackupException: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: H:\HudsonBackup\backup_20091125_1202.zip (The system cannot find the path specified) (and the archive is probably corrupt but I could not delete it)
    at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:91)
    at org.jvnet.hudson.plugins.backup.utils.BackupTask.run(BackupTask.java:85)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: H:\HudsonBackup\backup_20091125_1202.zip (The system cannot find the path specified) (and the archive is probably corrupt but I could not delete it)
    at org.jvnet.hudson.plugins.backup.utils.BackupEngine.handleEnd(BackupEngine.java:80)
    at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:336)
    at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:89)
    ... 2 more
    [ INFO] Cancel hudson shutdown mode
    [ INFO] Backup end at 02:50
    [ INFO] 5.922s

    Also, I noticed that the help text on the plugin interface doesn't work.

    David

  2. Unknown User (boy.pockets.forward@gmail.com)

    It seems that your todo list already has an item to schedule a back up (I think that is what "Backup planification" is supposed to mean (big grin) ). Either way, it would be nice to have a weekly backup or something similar. Or maybe there is already a way to do this?

    Thanks for the extension :)

  3. Some issues in 1.3:

    • In the setup menu under 'Backup Content' I am getting a status code: 404 error when trying to view the associated help.
    • When I check 'backup builds history' and 'backup maven artifacts' and save, those options do not stay checked, i.e. i have to re-check them the next time i go into setup.  but they do backup
    • Also when using tar.gz or tar.bz2 on Windows I get an ArchiverException/IOException:  "Request to write '3020 bytes' exceeds size in header of '330623' " Zip works fine though.
    • Finally being able to schedule backups really is a 'must-have' feature, perhaps through the standard hudson jobs screen?

    Otherwise great plugin, very useful!

    Thanks 

  4. Unknown User (alexanderpopov)

    David Aldrich, I got this problem, when I tried to backup to map network disk. Backup to local disk executed successfully.

  5. Unknown User (jan@commsquare.com)

    The schedule the backup, I have created a job in hudson that runs every week following command:

    wget http://<hudson address>/backup/launchBackup &

  6. Unknown User (alank)

    I just upgraded to 1.5 from 1.2 and get this error every time.

    [ INFO] Backup started at 21:11
    [ INFO] Setting hudson in shutdown mode to avoid files corruptions.
    [ INFO] Waiting all jobs end...
    [ INFO] Number of running jobs detected : 0
    [ INFO] All jobs finished.
    [ INFO] Full backup file name : D:\TransferDataFolder\Hudson Backup_20100819_1721.zip
    ERROR org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
    org.jvnet.hudson.plugins.backup.BackupException: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
    at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:91)
    at org.jvnet.hudson.plugins.backup.utils.BackupTask.run(BackupTask.java:64)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
    at org.jvnet.hudson.plugins.backup.utils.BackupEngine.handleEnd(BackupEngine.java:80)
    at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:336)
    at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:89)
    ... 2 more
    [ INFO] Cancel hudson shutdown mode
    [ INFO] Backup end at 21:17
    [ INFO] 6.031s

    What is going on?

    1. Don't you have any antivirus software which would access the zip file while it's being created?

  7. Hi

    I am running Hudson 1.373 with Backup plugin 1.5.  I found today that if a backup is started from IE8, the backup file is written but the browser window stalls after:

    [ INFO] Backup started at [08/26/10 09:54:30]

    [ INFO] Setting hudson in shutdown mode to avoid files corruptions.

    [ INFO] Waiting all jobs end...

    [ INFO] Number of running jobs detected : 0

    The browser never shows the backup as completed.

    The browser commentary is correct when using Firefox 3.6.8.

    Best regards

    David

  8. What about version 1.6 release ?

    Also I wonder if you plan to add backup profiles (named).

    ie defining one for backuping configuration files and another for full contents.

    And allow user to backup using one of defined profils :

    http://<hudson address>/backup/launchBackup?profile1

    http://<hudson address>/backup/launchBackup?profile2

    ...

    Regards

    1. Yep, I'll release it on Friday.
      For the notion of profile, please open a JIRA issue to track your request. If you implement it, that would be good as I don't have much time for that.

        1. Release 1.6 delivered today.

  9. Please please please

    Will you "Backup plugin", "thinBackup plugin", "Exclusive execution plugin" and others get together and make a single fully-functional backup plugin.

    It's just too confusing for the rest of us ...

    Thanks!

  10. hello,

    I installed backup plugin and I could generate the backup with backup now but when I want to check with restore I have this message error:

    [ INFO] Restore started at []
    [ INFO] Working into /var/lib/jenkins_restore directory
    [ INFO] A old restore working dir exists, cleaning ...
    ERROR Unable to delete /var/lib/jenkins_restore

    I had another error message before and I thought that was permission problem so I change the owndership of that directory to "jenkins" user and group (creating the jenkins_restore directory). I am not sure what I am missing

    [ INFO] Restore started at []
    [ INFO] Working into /var/lib/jenkins_restore directory
    [ INFO] Uncompressing archive file...
    org.jvnet.hudson.plugins.backup.utils.compress.ArchiverException: Unable to created directory /var/lib/jenkins_restore
    at org.jvnet.hudson.plugins.backup.utils.compress.AbstractUnArchiver.unArchive(AbstractUnArchiver.java:52)
    at org.jvnet.hudson.plugins.backup.utils.RestoreTask.run(RestoreTask.java:94)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.io.IOException: Unable to create directory /var/lib/jenkins_restore
    at org.apache.commons.io.FileUtils.forceMkdir(FileUtils.java:1488)
    at org.jvnet.hudson.plugins.backup.utils.compress.AbstractUnArchiver.unArchive(AbstractUnArchiver.java:48)
    ... 2 more
    ERROR Error uncompressing archive : Unable to created directory /var/lib/jenkins_restore

    I need to make backup and also testing to migrate that to other jenkins instance in other server (more easy way to create different instance with same configuration)Thank you in advance!

  11. It seems that the link for Subversion is already out of dated. https://github.com/jenkinsci/backup-plugin may correct.

  12. how do i schedule the backup to every day at 5 am instead of doing it manually

Write a comment…