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.
In August 2020, the Jenkins project voted to replace the term master with controller. We have taken a pragmatic approach to cleaning these up, ensuring the least amount of downstream impact as possible. CloudBees is committed to ensuring a culture and environment of inclusiveness and acceptance - this includes ensuring the changes are not just cosmetic ones, but pervasive. As this change happens, please note that the term master has been replaced through the latest versions of the CloudBees documentation with controller (as in managed controller, client controller, team controller) except when still used in the UI or in code.