Merge branch 'master' into ignore-values
This commit is contained in:
		
						commit
						ecba1dd7f5
					
				|  | @ -1 +1 @@ | ||||||
| v0.4.2 | v0.4.3 | ||||||
|  |  | ||||||
|  | @ -51,6 +51,10 @@ if [[ "$ret" -eq 0 ]]; then | ||||||
|   _log "INFO" "[backup] backup ${BACKUP_NUMBER} was completed without warnings" |   _log "INFO" "[backup] backup ${BACKUP_NUMBER} was completed without warnings" | ||||||
| elif [[ "$ret" -eq 1 ]]; then | elif [[ "$ret" -eq 1 ]]; then | ||||||
|   _log "INFO" "[backup] backup ${BACKUP_NUMBER} was completed with some warnings" |   _log "INFO" "[backup] backup ${BACKUP_NUMBER} was completed with some warnings" | ||||||
|  | else | ||||||
|  |   _log "ERROR" "[backup] backup ${BACKUP_NUMBER} failed with error code: $ret" | ||||||
|  |   _clean | ||||||
|  |   exit "$ret" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| mv "${BACKUP_TMP_DIR}/${BACKUP_NUMBER}.tar.zstd" "${BACKUP_DIR}/${BACKUP_NUMBER}.tar.zstd" | mv "${BACKUP_TMP_DIR}/${BACKUP_NUMBER}.tar.zstd" "${BACKUP_DIR}/${BACKUP_NUMBER}.tar.zstd" | ||||||
|  |  | ||||||
|  | @ -39,7 +39,17 @@ else | ||||||
|   exit 1 |   exit 1 | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| tar $OPTS -C "${JENKINS_HOME}" -xf "${BACKUP_DIR}/${BACKUP_NUMBER}.${EXT}" | tar $OPTS -C "${JENKINS_HOME}" -xf "${BACKUP_DIR}/${BACKUP_NUMBER}.${EXT}" || ret=$? | ||||||
|  | 
 | ||||||
|  | if [[ "$ret" -eq 0 ]]; then | ||||||
|  |   _log "INFO" "[restore] restore ${BACKUP_NUMBER} was completed without warnings" | ||||||
|  | elif [[ "$ret" -eq 1 ]]; then | ||||||
|  |   _log "INFO" "[restore] restore ${BACKUP_NUMBER} was completed with some warnings" | ||||||
|  | else | ||||||
|  |   _log "ERROR" "[restore] restore ${BACKUP_NUMBER} failed with error code: $ret" | ||||||
|  |   exit "$ret" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| _log "INFO" "[restore] deleting lock file ${TRAP_FILE}" | _log "INFO" "[restore] deleting lock file ${TRAP_FILE}" | ||||||
| test -f "${TRAP_FILE}" && rm -f "${TRAP_FILE}" | test -f "${TRAP_FILE}" && rm -f "${TRAP_FILE}" | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ for the Jenkins Operator. | ||||||
| Two commands (e.g. scripts) are required: | Two commands (e.g. scripts) are required: | ||||||
| 
 | 
 | ||||||
| - a backup command, e.g. `backup.sh` that takes one argument, a **backup number** | - a backup command, e.g. `backup.sh` that takes one argument, a **backup number** | ||||||
| - a restore command, e.g. `backup.sh` that takes one argument, a **backup number** | - a restore command, e.g. `restore.sh` that takes one argument, a **backup number** | ||||||
| 
 | 
 | ||||||
| Both scripts need to return an exit code of `0` on success and `1` or greater for failure. | Both scripts need to return an exit code of `0` on success and `1` or greater for failure. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue