Do you mean your Jenkins master is hosted on a VM in Azure or the build nodes?
I would not backup the build nodes. I would treat them as volatile and only 
focus on backing up the master. Unless you have a good reason for backing up 
the build nodes also.

As for the Jenkins master, I do not know much about Azure, but does it have any 
kind of copy-on-write snapshot mechanism that you could trigger from within the 
VM? If yes, then you could call that mechanism from within a periodic backup 
job within Jenkins, but make sure the job only executes when nothing else is 
running on Jenkins.

In our case we use Btrfs for the filesystem, so we call something like the 
following from within a Jenkins job:

  sudo btrfs subvolume snapshot <jenkins_home> <snapshot_path>

To make sure the job only runs when nothing else is running we take advantage 
of the following plugin:

  https://plugins.jenkins.io/build-blocker-plugin

and then just use '.*' for the regular expression pattern.
After the snapshot is complete, the snapshot itself is backed up to tape with a 
commercial solution. I believe our IT department does this on the block level.

Cheers

Artur

________________________________________
From: jenkinsci-users@googlegroups.com <jenkinsci-users@googlegroups.com> on 
behalf of gotviser...@gmail.com <gotviser...@gmail.com>
Sent: 26 November 2018 22:42
To: Jenkins Users
Subject: Re: Jenkins Backup and Restore

Our cloud is Azure.  Do you have any suggestions for this?

On Monday, November 26, 2018 at 4:13:06 PM UTC-5, Artur Szostak wrote:
Just my opinion: but I would forget about the backup plugins in Jenkins for 
full production backups. They all do a poor job when it comes to a full backup 
for a production system that also needs high availability. The best that can be 
done at the moment is to run Jenkins on a file system or data store that is 
able to perform copy-on-write snapshots. From within Jenkins you will want to 
setup a simple job that triggers the copy-on-write snapshot when no other job 
is running. Then use your normal production backup solutions to backup the 
snapshot in the background.

Cheers

Artur

________________________________________
From: jenkins...@googlegroups.com <jenkins...@googlegroups.com> on behalf of 
gotvi...@gmail.com <gotvi...@gmail.com>
Sent: 01 November 2018 21:36
To: Jenkins Users
Subject: Jenkins Backup and Restore

We have a Jenkins instance running and we are trying to setup a backup and 
restore mechanism in case of any mishaps.  We are looking for a full backup of 
the Jenkins and so decided to go with PeriodicBackup plugin.  With this plugin, 
the backup works fine.  But, we are trying to restore it in a completely new 
Jenkins setup and not able to restore.  When we pick the backup file that we 
want to restore from, it says restoring, but nothing happens.  Even after 
waiting out for over 30 mins, nothing is restored.  As a work around, I stopped 
the Jenkins service, renamed the 'JENKINS_HOME' (/var/lib/jenkins) folder to 
'jenkins_backup' and created another folder called 'jenkins' in the same 
location.  In this folder, I copied all the files from the backup and then 
started Jenkins (NOTE: I didn't change the .owner file.  I'm using the .owner 
file of the new Jenkins only).  Jenkins came up and I was able to see all the 
configurations from the old one.  Everything was fine.  I let it like that 
overnight and in the morning when I came and tried to access it, Jenkins was 
way too slow and I was not able to save any new configuration.  When I try I'm 
getting
java.io.ioexception: too many open files jenkins
error.  I restarted the jenkins and it's taking too long for the UI to come up. 
 Am I doing anything wrong here?  Any suggestions for my requirement?

P.S. - I tried SCMSync plugin and ThinBackup.  But, problem with these are that 
they don't do full backup.  But, with ThinBackup both backup and restore works 
fine.

--
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<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0c58b4fa-4e8b-4c53-9ca9-b99397078fae%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/0c58b4fa-4e8b-4c53-9ca9-b99397078fae%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7c46683a-fbfb-4d79-b470-10246e8999d6%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/7c46683a-fbfb-4d79-b470-10246e8999d6%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c643a72943554a04bff8a5d0064f18d7%40partner.eso.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to