diff --git a/backup/pvc/bin/backup.sh b/backup/pvc/bin/backup.sh index 40c9f8dd..622e458f 100755 --- a/backup/pvc/bin/backup.sh +++ b/backup/pvc/bin/backup.sh @@ -41,11 +41,12 @@ trap '_trap' SIGQUIT SIGINT SIGTERM # config.xml in child directories is state that should. For example- # branches/myorg/branches/myrepo/branches/master/config.xml should be retained while # branches/myorg/config.xml should not +ret=0 tar --zstd -C "${JENKINS_HOME}" -cf "${BACKUP_TMP_DIR}/${BACKUP_NUMBER}.tar.zstd" \ - --exclude jobs/*/workspace* \ - --no-wildcards-match-slash --anchored \ + --exclude 'jobs/*/workspace*' \ + --no-wildcards-match-slash \ --ignore-failed-read \ - --exclude jobs/*/config.xml -c jobs || ret=$? + --exclude 'jobs/*/config.xml' -c jobs || ret=$? if [[ "$ret" -eq 0 ]]; then _log "INFO" "[backup] backup ${BACKUP_NUMBER} was completed without warnings"