Restoring from the CloudBees Backup Plugin

The CloudBees Backup Plugin is only available for CloudBees CI. This chapter explains how to restore from a backup created with the CloudBees Backup Plugin. Refer to Restoring $JENKINS_HOME manually to restore other Jenkins-based deployments.

Restoring from backup (using a restore job)

Masters with CloudBees Backup Plugin 3.38 or later installed has support for Restore job type.

To restore a backup:

  1. Click New Job from the left and select Backup or Restore Jenkins. This takes you to the page where you configure the restore project. Configuration of a restore job is very similar to that of a freestyle project.

  2. Click Add build step and add Restore from backup builder.

  3. Then, just like a backup job, you must configure where the backup is retrieved from. The latest backup available in the given source will be used to restore.

  4. When running the restore job, the backup file is downloaded from the configured backend to the Jenkins filesystem, checked for integrity, then unpacked. After these steps are completed, you will be prompted to restart the Jenkins instance.

  5. Upon restart, $JENKINS_HOME is replaced with the content of the backup file, and the restore process is complete.

Restore is supported only from full backup files

The restore process will replace the current `$JENKINS_HOME with the data from backup archive. Therefore it is important to restore from a full backup. If there is data in $JENKINS_HOME that is not in the backup and needs to be kept, click the "Advanced" button under "Restore options" and select "Preserve Jenkins home contents". This will copy the current $JENKINS_HOME into a directory named "archive-<timestamp>".