Backup Jenkins Jobs to Git Repo Automatically
Because I set up many Jenkins jobs on my home server, and change it if need some time, but Jenkins job configuration does not provide history and a way to roll back. So this post shows to set up a job to backup jobs configuration to a git repo daily if any change.
Install git in Jenkins server and config git user first.
e.g. Jenkins Bot, jenkins.bot@xxx.me
Implement it via a shell script
1 | !/bin/bash |

I set up the backup job to run daily automatically, 3AM everyday.

then, you will see the git commit history every day.
