Jenkins has a backup plugin which can used to backup critical configuration settings related to Jenkins. Follow the steps given below to have a backup in place.
Step 1 − Click on Manage Jenkins and choose the ‘Manage Plugins’ option.
Step 2 − In the available tab, search for ‘Backup Plugin’. Click On Install without Restart. Once done, restart the Jenkins instance
Step 3 − Now when you go to Manage Jenkins, and scroll down you will see ‘Backup Manager’ as an option. Click on this option.
Step 4 − Click on Setup.
Step 5 − Here, the main field to define is the directory for your backup. Ensure it’s on another drive which is different from the drive where your Jenkins instance is setup. Click on the Save button.
Step 6 − Click on the ‘Backup Hudson configuration’ from the Backup manager screen to initiate the backup.
The next screen will show the status of the backup
To recover from a backup, go to the Backup Manager screen, click on Restore Hudson configuration.
The list of backup’s will be shown, click on the appropriate one to click on Launch Restore to begin the restoration of the backup.