How to backup Jenkins data to Another Server with a Jenkins job?

How to backup Jenkins data to Another Server with a Jenkins job?



This pipeline automatically copies Jenkins data to another server. You should install rsync in your server beforehand. You can find the Jenkinsfile in my Github repo. Do not forget to change credentials-id, your-repo-name, and your folder name in the Jenkinsfile.

Go to Jenkins Dashboard

Select New Item

Enter an item name "Daily backup of Jenkins to another server"

select pipeline > OK

Description: This pipeline sends Jenkins backup data to another server every night regularly.

Build Triggers > click Build periodically > Schedule > enter "H 5 * * *" (this job will run at 5am everyday.)

Pipeline > Pipeline script from SCM > Choose your repo >

Script Path > "Jenkinsfile"

Find Jenkinsfile here

Click Apply.

Your daily backup is ready to use.


Sezgin Erdem

Platform Engineer @ Chillipharm

3 年

Nice work F.Deniz SARI

要查看或添加评论,请登录

Feyz SARI的更多文章

社区洞察

其他会员也浏览了