Art  Lind

Art Lind

1597986304

Backup and Restoring In Jenkins

If you are using Jenkins for a while then you must be aware about the importance of jobs related data and what can happen when the data is lost. This blog provides some ways through which backup and restoring in Jenkins can be carried out.

The data loss can be the result of hardware or software failure, data corruption, or a human-caused event, or accidental deletion of data.

The purpose of the backup is to create a copy of data that can be restored in the event of a primary data failure. Backup copies allow data to be restored from an earlier point in time to help the business recover from an unplanned event.

Why Jenkins needs Backup and Restoring mechanism ?

In Jenkins, all the settings, build logs, and archives of the artifacts are stored under the JENKINS_HOME directory as Jenkins doesn’t use any database. Setting access rights, selecting the necessary plugins and job configuration is quite a laborious process, so it’s a good idea to organize regular backups of all the necessary settings and parameters.

How to perform Backup and Restoring In Jenkins

In this post we will be exploring 2 ways :

  • By creating a freestyle project
  • By using ThinBackup plugin

How to take backups in Jenkins ?

The simplest way is to just keep Jobs’s folder separately as backup and whenever it’s needed just copy it back.

As the build jobs created under this directory contains all the details of each and every individual jobs configured in the Jenkins install. The files related to jobs can be replicated to multiple locations.

But again it’s a manual task to copy the files from one location to another so instead let’s leverage Jenkins for B & R process by automating it.

Creating a freestyle project to take regular backups

Before proceeding initiate git repository and connect with it.

Now lets configure a freestyle project that takes regular backup .

  • Create a new item in Jenkins and choose Freestyle project
  • In general section provide description if required and omit everything else.
  • Choose None in Source Code Management section
  • In Build Triggers section choose Build periodically and provide a cron expression to trigger your backup . For example :
  • 0 12 * * * // will trigger at 12:00pm
  • 45 12 * * * // will trigger at 12:45pm
  • Then choose Execute shell from the Build section and write a shell script ( or you can use the script provided in extra section at the bottom of this post ) to push the contents of your JENKINS_HOME to GITHUB as a backup which can be pulled whenever required from the same .
  • Finally save the job and you have automated your backup process.
  • You can also make this job run after every job you build by selecting build other project option from the post-build section of other project builds.

To restore Jenkins

  • Go to JENKINS_HOME directory and initiate a new git repository
  • Cleans the working tree by recursively removing files that are not under version control
  • Add a new remote and you just have Pull all data from GitHub
  • Now all you have to do is restart Jenkins and its restored.

Using ThinBackup

Jenkins can be made enormously powerful by integrating several plugins. Here we will use a plugin for the backup management in Jenkins – ThinBackup plugin.

This plugin backs up the job specific configuration files.

#devops #jenkins #tech blogs #backup #devops #jenkins plugins #restore #thinbackup

What is GEEK

Buddha Community

Backup and Restoring In Jenkins
Art  Lind

Art Lind

1597986304

Backup and Restoring In Jenkins

If you are using Jenkins for a while then you must be aware about the importance of jobs related data and what can happen when the data is lost. This blog provides some ways through which backup and restoring in Jenkins can be carried out.

The data loss can be the result of hardware or software failure, data corruption, or a human-caused event, or accidental deletion of data.

The purpose of the backup is to create a copy of data that can be restored in the event of a primary data failure. Backup copies allow data to be restored from an earlier point in time to help the business recover from an unplanned event.

Why Jenkins needs Backup and Restoring mechanism ?

In Jenkins, all the settings, build logs, and archives of the artifacts are stored under the JENKINS_HOME directory as Jenkins doesn’t use any database. Setting access rights, selecting the necessary plugins and job configuration is quite a laborious process, so it’s a good idea to organize regular backups of all the necessary settings and parameters.

How to perform Backup and Restoring In Jenkins

In this post we will be exploring 2 ways :

  • By creating a freestyle project
  • By using ThinBackup plugin

How to take backups in Jenkins ?

The simplest way is to just keep Jobs’s folder separately as backup and whenever it’s needed just copy it back.

As the build jobs created under this directory contains all the details of each and every individual jobs configured in the Jenkins install. The files related to jobs can be replicated to multiple locations.

But again it’s a manual task to copy the files from one location to another so instead let’s leverage Jenkins for B & R process by automating it.

Creating a freestyle project to take regular backups

Before proceeding initiate git repository and connect with it.

Now lets configure a freestyle project that takes regular backup .

  • Create a new item in Jenkins and choose Freestyle project
  • In general section provide description if required and omit everything else.
  • Choose None in Source Code Management section
  • In Build Triggers section choose Build periodically and provide a cron expression to trigger your backup . For example :
  • 0 12 * * * // will trigger at 12:00pm
  • 45 12 * * * // will trigger at 12:45pm
  • Then choose Execute shell from the Build section and write a shell script ( or you can use the script provided in extra section at the bottom of this post ) to push the contents of your JENKINS_HOME to GITHUB as a backup which can be pulled whenever required from the same .
  • Finally save the job and you have automated your backup process.
  • You can also make this job run after every job you build by selecting build other project option from the post-build section of other project builds.

To restore Jenkins

  • Go to JENKINS_HOME directory and initiate a new git repository
  • Cleans the working tree by recursively removing files that are not under version control
  • Add a new remote and you just have Pull all data from GitHub
  • Now all you have to do is restart Jenkins and its restored.

Using ThinBackup

Jenkins can be made enormously powerful by integrating several plugins. Here we will use a plugin for the backup management in Jenkins – ThinBackup plugin.

This plugin backs up the job specific configuration files.

#devops #jenkins #tech blogs #backup #devops #jenkins plugins #restore #thinbackup

Jenkins Is Getting Old — It’s Time to Move On

By far, Jenkins is the most adopted tool for continuous integration, owning nearly 50% of the market share. As so many developers are using it, it has excellent community support, like no other Jenkins alternative. With that, it has more than 1,500 plugins available for continuous integration and delivery purposes.

We love and respect Jenkins. After all, it’s the first tool we encountered at the beginning of our automation careers. But as things are rapidly changing in the automation field, Jenkins is** left behind with his old approach**. Even though many developers and companies are using it, most of them aren’t happy with it. Having used it ourselves on previous projects, we quickly became frustrated by its lack of functionality, numerous maintenance issues, dependencies, and scaling problems.

We decided to investigate if other developers face the same problems and quickly saw the need to create a tool ourselves. We asked some developers at last year’s AWS Summit in Berlin about this. Most of them told us that they chose Jenkins because it’s free in the first place. However, many of them expressed interest in trying to use some other Jenkins alternative.

#devops #continuous integration #jenkins #devops adoption #jenkins ci #jenkins pipeline #devops continuous integration #jenkins automation #jenkins scripts #old technology

Kira  Nienow

Kira Nienow

1595181780

Jenkins — How Can We Get Started Jobs in Jenkins (Part 3)

In the previous article, we learned how to create Users + Manage + Assign Roles in Jenkins. In this article, I will be highlighting how can we create some basic JOBS in Jenkins. Furthermore, these are the points which I am going to explain.

  • How to create a basic Job in Jenkins.
  • Basic Job Configurations.
  • How to run the Job remotely.
  • How to chain Job Execution

How to create a basic Job in Jenkins?

First of all **click **on New Item on the Jenkins Dashboard. Then Give a name to your project. Then you can select a **Freestyle **or **Multi-configuration **project. For this tutorial please go with the Freestyle project. Then click on the **Okay **button.

As soon as you complete these simple steps you will be taken to the **configuration **window. Here you can provide different details about Jobs. There are 5 sections available. **General, Source Code Management, Build Triggers, Build, **and Post-build Actions.

Image for post

General Section

Here you can provide a quick description of your project or Job. You can preview it also. You can also use HTML tags inside the description.

Image for post

Source Code Management Section

So here in case you want to take the build from any source code system like Git, Bitbucket, or any other source code management portals. We need to add plugins to those source code repositories. But in the coming tutorials, we will see how exactly we can get our build and trigger our Job from a source code management system.

#jenkins-job-builder #jenkins #jenkins-pipeline

Alisha  Larkin

Alisha Larkin

1624739940

5 ways to optimize your backup costs with Azure Backup

At Azure Backup, we’re committed to helping you optimize your backup costs. Over the last few months, we’ve introduced a comprehensive collection of features that not only gives you more visibility into your backup usage, but also helps you take action to achieve significant cost savings.

To help you get started with this journey, below are five steps you can take to optimize your backup costs, without needing to compromise on the safety of your data.

1. Clean up backups for your deleted resources

2. Optimize your backup policies

3. Take advantage of selective disk backup

4. Determine your required storage redundancy settings

5. Summary

#storage #backup & recovery #azure backup #azure #optimize your backup

Backup and Restore of K8s using K10 and Kanister(Mutating Web Hooks) with Minio

If you’ve just stumbled upon looking up for ways to backup and restore containerised stateful workload on Kubernetes, then I hope you won’t get disappointed. Before you delve into this more a word of caution this one is for specific use case not a typical one, that’s the reason of this blog.

Here I am going to show you how to deploy a simple stateful MySQL POD deployment and injecting some data and give you intricacies and details of using Kasten and Kanister with screenshots and commands which will help you understand how it woks and try it yourselves like DIY.

I would highly recommend you have a look at my earlier blog on backup and restore of applications running on Kubernetes using Velero.

There are glaring differences between how Velero and Kasten works in this space of backup and restore of Kubernetes applications. I don’t want to provide what those difference are or their pros or cons, because I guess that will bring in bias to the reader.

#restore #backup #kasten #containers #kubernetes