Skip to content

Commit

Permalink
Include jobs/*/config.xml for backups
Browse files Browse the repository at this point in the history
For easier workarounds for #104 and #210 specifically
  • Loading branch information
pawelprazak committed Nov 26, 2019
1 parent f0d058f commit 2a6c8e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup/pvc/bin/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BACKUP_TMP_DIR=$(mktemp -d)
backup_number=$1
echo "Running backup"

tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/config.xml --exclude jobs/*/workspace* -c jobs && \
tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* -c jobs && \
mv ${BACKUP_TMP_DIR}/${backup_number}.tar.gz ${BACKUP_DIR}/${backup_number}.tar.gz

[[ ! -s ${BACKUP_DIR}/${backup_number}.tar.gz ]] && echo "backup file '${BACKUP_DIR}/${backup_number}.tar.gz' is empty" && exit 1;
Expand Down

0 comments on commit 2a6c8e8

Please sign in to comment.