Restoring manually

1 minute read

Backup files are in the tar+gzip format, with file names relative to the Jenkins home directory. Example of restoring a backup using Linux (GNU tar) syntax:

$ cd $$JENKINS_HOME $ tar xvfz /backups/jenkins/backup-daily-13.tar.gz config.xml jobs/myjob/config.xml ...

$$JENKINS_HOME is relocatable, meaning you don’t have to restore the backup into the same instance it was created from. This allows you to exercise the backup restore steps by creating a different Jenkins instance on your own computer and restoring things there.

  1. Stop Jenkins.

  2. Move all the contents of the existing $JENKINS_HOME to a different location.

  3. Restore $JENKINS_HOME backup to the now empty directory.

    1. If secrets/master.key was omitted from the backup but preserved in some secrets storage, restore it before the next step.

  4. Start Jenkins.