fixed backup error handling

This commit is contained in:
André Bauer 2017-11-21 18:44:46 +01:00
parent 991cb6aaae
commit a1dd2ba876

View File

@ -16,7 +16,7 @@ function zammad_backup {
echo "${TIMESTAMP} - backuping zammad..." echo "${TIMESTAMP} - backuping zammad..."
# delete old backups # delete old backups
test -d ${BACKUP_DIR} && find ${BACKUP_DIR}/*_zammad_*.gz -type f -mtime +${HOLD_DAYS} -exec rm {} \; test -d ${BACKUP_DIR} && find ${BACKUP_DIR}/*_zammad_*.gz -type f -mtime +${HOLD_DAYS} -exec rm {} \; || true
# tar files # tar files
tar -czf ${BACKUP_DIR}/${TIMESTAMP}_zammad_files.tar.gz ${ZAMMAD_DIR} tar -czf ${BACKUP_DIR}/${TIMESTAMP}_zammad_files.tar.gz ${ZAMMAD_DIR}