Archive Jenkins settings and plugins
- $JENKINS_HOME/*.xml
- $JENKINS_HOME/plugins/*.jpi
- $JENKINS_HOME/jobs//.xml
- $JENKINS_HOME/users/*
./jenkins-backup.sh /path/to/jenkins_home archive.tar.gz
# add timestamp suffix
./jenkins-backup.sh /path/to/jenkins_home backup_`date +"%Y%m%d%H%M%S"`.tar.gz
https://wiki.jenkins-ci.org/display/JENKINS/Exclusive+Execution+Plugin
https://github.com/sue445/jenkins-backup-script.git
- Recommended : specify Branch Specifier with latest release tag
- latest tag is
0.0.6
ex.
./jenkins-backup.sh $JENKINS_HOME /path/to/backup_`date +"%Y%m%d%H%M%S"`.tar.gz
- Debian lenny
- CentOS 6
install ruby 2.1+
bundle install
bundle exec rake test
# keep backup with latest 30 days
find /path/to/backup_* -mtime +30 | xargs rm -f
- backup
$JENKINS_HOME/users
- copy failed when job name contains space (thx @rubenjgarcia)
- There are cases where the directory is not created
- remove archive file if exists
- first release