Jenkins provides a backup plugin that can be used to backup key Jenkins configuration settings. To create a backup, follow the procedures outlined below.
Step 1: Navigate to Manage Jenkins and select the 'Manage Plugins' option.
Step 2 − Look for ‘Backup Plugin’ on the ‘Available’ tab. Click On ‘Install without Restart’. Start the Jenkins instance again once done.
Step 3 − Now, when you browse to ‘Manage Jenkins’ and scroll down, ‘Backup Manager’ option will be available. Select it.
Step 4 − Click on Setup.
Step 5 − The main field to define here is the backup directory. Make sure it's on a different drive from the one where your Jenkins instance is installed. Save the file by clicking the Save button.
Step 6 − To begin the backup, go to the Backup management interface and click the 'Backup Hudson configuration' button.
The screen that follows will show the status of the backup
To restore from a backup, navigate to the Backup Manager panel and select Restore Hudson configuration.
The list of backups will be displayed; click on the right one to launch the backup restoration process.