Script for backing up Jenkins

69 views
Skip to first unread message

gotvi...@gmail.com

unread,
Oct 16, 2018, 9:33:00 AM10/16/18
to Jenkins Users
Hello,

We are using Open Source Jenkins.  We want to backup the configuration and any changes happening in Jenkins everyday for recovery purpose.  Is there any scripts available for this purpose?  Jenkins is on Linux VM.

Vladimir Zak

unread,
Oct 16, 2018, 9:40:29 AM10/16/18
to jenkins...@googlegroups.com
Hi,
Try ThinBackup plugin.

Vladimír

Dne út 16. 10. 2018 15:33 uživatel <gotvi...@gmail.com> napsal:
Hello,

We are using Open Source Jenkins.  We want to backup the configuration and any changes happening in Jenkins everyday for recovery purpose.  Is there any scripts available for this purpose?  Jenkins is on Linux VM.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1e628851-fdad-46fe-b71c-ce5a4c494a17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sam K

unread,
Oct 16, 2018, 12:05:06 PM10/16/18
to Jenkins Users
Hi
I have a backup mechanism in place. I have a second Jenkins instance and I've been using rsync in a cronjob to keep sending all config.xmls and basically everything except build information and artifacts to the backup Jenkins. It send the information every 2 mins.

I remember testing it once and it worked as expected. But it's been more than a year since the last testing to be honest.

Adam von Nieda

unread,
Oct 16, 2018, 2:03:50 PM10/16/18
to jenkins...@googlegroups.com

  I have a similar setup for Disaster Recovery, and rsync the entire stack. Works like a charm, and I’ve tested within the last week. 

--
Adam vonNieda




--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Sreeram Krishna

unread,
Oct 17, 2018, 11:36:15 AM10/17/18
to jenkins...@googlegroups.com
Glad to hear that Adam. 

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/OeOFbzOtb_I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/BDFEECE5-DB14-4A94-B604-64EC374309C9%40vonnieda.org.

gotvi...@gmail.com

unread,
Oct 17, 2018, 5:22:31 PM10/17/18
to Jenkins Users
Thanks everyone for the update.  For now we are going with the Periodic Backup plugin which provides the backup of entire JENKINS_HOME.  This plugin works exactly the way we want.  But, we might end up with rsync option eventually.  Weighing in on each of the option.  Will keep posted.  Thanks again everyone.

Sreeram Krishna

unread,
Oct 17, 2018, 6:43:21 PM10/17/18
to jenkins...@googlegroups.com
Hi
  What is your backup location?  I hope its not on the same server as the Jenkins Master.  

RAJENDRA PRASAD

unread,
Oct 17, 2018, 8:22:16 PM10/17/18
to jenkins...@googlegroups.com
Hi I can suggest two approaches here,
All Jenkins configuration (jobs config, credentials,...etc) will be saved in <jenkins_home> directory.

If it is running on Linux it must in /var/lib/Jenkins/ folder

On the same Linux machine install SVN/git client create a commnd to check-in files.

You can run this command via Unix cron job.

Another approach is via Jenkins backup plugin.

Another approach is to use a seperate Jenkins job to run SVN/git check-in command from build command.

But last approach may not work when all Jenkins executors are stuck while  running other jobs.

Thanks
Rajendra

On Tue 16 Oct, 2018, 6:33 AM , <gotvi...@gmail.com> wrote:
Hello,

We are using Open Source Jenkins.  We want to backup the configuration and any changes happening in Jenkins everyday for recovery purpose.  Is there any scripts available for this purpose?  Jenkins is on Linux VM.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

gotvi...@gmail.com

unread,
Oct 18, 2018, 3:58:09 PM10/18/18
to Jenkins Users
Nope.  I have a volume attached to that server and backing up to that volume.

gotvi...@gmail.com

unread,
Oct 18, 2018, 4:00:06 PM10/18/18
to Jenkins Users
I found a plugin SCM Sync plugin.  Exploring this as well.
Reply all
Reply to author
Forward
0 new messages