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.
-
Stop Jenkins.
-
Move all the contents of the existing
$JENKINS_HOME
to a different location. -
Restore
$JENKINS_HOME
backup to the now empty directory.-
If
secrets/master.key
was omitted from the backup but preserved in some secrets storage, restore it before the next step.
-
-
Start Jenkins.