Revised: Save Hudson/Jenkins settings and installed plugins


Posted:   |  More posts about configuration continuous integration howto linux software solved

.. code:: bash
 #!/bin/bash

JENKINS_FOLDER="/shared/jenkins"

DEST_FOLDER="/jenkins-backup"

if [ ! -d "${DEST_FOLDER}" ]; then mkdir -p ${DEST_FOLDER} fi

if [ ! -d "${DEST_FOLDER}/jobs" ]; then mkdir -p ${DEST_FOLDER}/jobs fi

cd ${JENKINS_FOLDER}

pwd

/usr/bin/rsync -v -a --relative --checksum ./*.xml ${DEST_FOLDER}

/usr/bin/rsync -v -a --relative --checksum ./plugins/ ${DEST_FOLDER}/

cd ${JENKINS_FOLDER}/jobs

pwd

find . -maxdepth 2 -name "config.xml" -print0 | /usr/bin/rsync -v -a --relative --checksum --files-from=- --from0 ./ ${DEST_FOLDER}/jobs/

Contents © 2013 Aleksey Maksimov - Powered by Nikola