1.

How to create a backup and copy files in Jenkins?

Answer»

It is CRITICAL to have Jenkins reinforcement with its information and setups. It incorporates, work configs, manufactured logs, modules, module design, etc. Jenkins Thin Backup is a   module for sponsorship up Jenkins. It backs up every one of the information dependent on your timetable and it handles the reinforcement maintenance too.

To begin, first, introduce the module. 

  1. Go to Manage Jenkins – > Manage Plugins
  2. Snap the Available tab and look for “Thin backup”
  3. Introduce the module and restart Jenkins.

Once introduced, pursue the means given beneath for designing reinforcement settings. 

  1. Go to Manage Jenkins — > ThinBackup
  2. Snap settings alternative.
  3. Enter the reinforcement choices as appeared and spare it. Every one of the alternatives is clear as crystal. The reinforcement index you determine ought to be writable by the client which is running the Jenkins administration. All the Jenkins reinforcement will be spared to the reinforcement registry you indicate.

It's anything but a smart thought to keep the Jenkins back in Jenkins itself. It is an absolute necessity to move slim reinforcements to distributed storage or some other reinforcement AREA. So that, regardless of whether Jenkins server crashes you will have every one of the information. In the event that you are on AWS, Azure or Google CLoud, you can TRANSFER the reinforcements separate stockpiling arrangements.

There is an alternative way of backup of the Jenkins Home folder. This contains all of your BUILD jobs configurations, your slave node configurations, and your build history. To create a backup of your Jenkins setup, just copy this directory.

You can see where is your Jenkins home with:

echo $JENKINS_HOME

And for example, if you only want to back up the jobs you can go to:

cd $JENKINS_HOME/jobs

And make a backup for that folder.

All that configuration will be a BUNCH of XML files.

If you are using the official Jenkins docker image, the home will be on: /var/jenkins_home



Discussion

No Comment Found