Compare commits

..

No commits in common. "4eebe49fa9f6685c465f95b6e6b0dee3a5df4e12" and "dc47af25eb161b6259ae58bb85b55ca9858ed508" have entirely different histories.

2 changed files with 4 additions and 65 deletions

View File

@ -305,7 +305,7 @@ fi
[[ -z "${BORG_RSH}" ]] && BORG_RSH="${DEFAULT_BORG_RSH}"
[[ -z "${BORG_LOG_DIR}" ]] && BORG_LOG_DIR="${DEFAULT_BORG_LOG_DIR}"
BORG_LOG_FILE="${BORG_LOG_DIR}//borg-backup.log"
BORG_LOG_FILE="${BORG_LOG_DIR}/${backup_date}.log"
[[ -z "${NC_DB_BACKUP_DIR}" ]] && NC_DB_BACKUP_DIR="${DEFAULT_NC_DB_BACKUP_DIR}"
@ -726,33 +726,4 @@ else
echo_ok
fi
blank_line
echononl "Create temporary logorotate configuration file 'logrotate_borg.conf'.."
cat << EOF > ${LOCK_DIR}/logrotate_borg.conf 2> ${log_file}
$(dirname "${BORG_LOG_FILE}")/* {
daily
rotate 7
missingok
compress
su root root
}
EOF
if [[ $? -gt 0 ]] ; then
echo_failed
error "$(cat "${log_file}")"
else
echo_ok
fi
echononl "Rotate logfile '${BORG_LOG_FILE}'.."
logrotate ${LOCK_DIR}/logrotate_borg.conf > ${log_file} 2>&1
if [[ $? -gt 0 ]] ; then
echo_failed
error "$(cat "${log_file}")"
else
echo_ok
fi
clean_up 0

View File

@ -297,7 +297,7 @@ fi
[[ -z "${DB_BACKUP_DIR}" ]] && DB_BACKUP_DIR="${DEFAULT_DB_BACKUP_DIR}"
[[ -z "${BORG_LOG_DIR}" ]] && BORG_LOG_DIR="${DEFAULT_BORG_LOG_DIR}"
BORG_LOG_FILE="${BORG_LOG_DIR}/borg-backup.log"
BORG_LOG_FILE="${BORG_LOG_DIR}/${backup_date}.log"
[[ -z "${DB_TYPE}" ]] && DB_TYPE="${DEFAULT_DB_TYPE}"
@ -654,9 +654,6 @@ durationReadable=$(printf "%02d hours %02d minutes %02d seconds" $durationHour $
echo -e "\n\n###### Server backup finished on ${endDateReadable} (${durationReadable}) ######\n" >> ${BORG_LOG_FILE}
blank_line
# Send Summery
#
if $terminal ; then
@ -696,34 +693,5 @@ else
echo_ok
fi
blank_line
echononl "Create temporary logorotate configuration file 'logrotate_borg.conf'.."
cat << EOF > ${LOCK_DIR}/logrotate_borg.conf 2> ${log_file}
$(dirname "${BORG_LOG_FILE}")/* {
daily
rotate 7
missingok
compress
su root root
}
EOF
if [[ $? -gt 0 ]] ; then
echo_failed
error "$(cat "${log_file}")"
else
echo_ok
fi
echononl "Rotate logfile '${BORG_LOG_FILE}'.."
logrotate ${LOCK_DIR}/logrotate_borg.conf > ${log_file} 2>&1
if [[ $? -gt 0 ]] ; then
echo_failed
error "$(cat "${log_file}")"
else
echo_ok
fi
clean_up 0