Correct log reports of file size to disk use, plus some log file formatting cleanups
This commit is contained in:
parent
646f8c4036
commit
01ec946eef
1 changed files with 8 additions and 8 deletions
|
|
@ -348,7 +348,7 @@ get_lock()
|
||||||
|
|
||||||
get_source_file_size()
|
get_source_file_size()
|
||||||
{
|
{
|
||||||
echo "---------[ Source File Size Information ]---------" >> ${LOGFILE}
|
echo "-----------[ Source Disk Use Information ]-----------" >> ${LOGFILE}
|
||||||
|
|
||||||
# Patches to support spaces in paths-
|
# Patches to support spaces in paths-
|
||||||
# Remove space as a field separator temporarily
|
# Remove space as a field separator temporarily
|
||||||
|
|
@ -397,7 +397,7 @@ get_source_file_size()
|
||||||
|
|
||||||
get_remote_file_size()
|
get_remote_file_size()
|
||||||
{
|
{
|
||||||
echo "------[ Destination File Size Information ]------" >> ${LOGFILE}
|
echo "---------[ Destination Disk Use Information ]--------" >> ${LOGFILE}
|
||||||
|
|
||||||
dest_type=`echo ${DEST} | cut -c 1,2`
|
dest_type=`echo ${DEST} | cut -c 1,2`
|
||||||
case $dest_type in
|
case $dest_type in
|
||||||
|
|
@ -423,7 +423,7 @@ get_remote_file_size()
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "Current Remote Backup File Size: ${SIZE}" >> ${LOGFILE}
|
echo "Current Remote Backup Disk Usage: ${SIZE}" >> ${LOGFILE}
|
||||||
echo >> ${LOGFILE}
|
echo >> ${LOGFILE}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -472,7 +472,7 @@ include_exclude()
|
||||||
|
|
||||||
duplicity_cleanup()
|
duplicity_cleanup()
|
||||||
{
|
{
|
||||||
echo "-----------[ Duplicity Cleanup ]-----------" >> ${LOGFILE}
|
echo "----------------[ Duplicity Cleanup ]----------------" >> ${LOGFILE}
|
||||||
if [[ "${CLEAN_UP_TYPE}" != "none" && ! -z ${CLEAN_UP_TYPE} && ! -z ${CLEAN_UP_VARIABLE} ]]; then
|
if [[ "${CLEAN_UP_TYPE}" != "none" && ! -z ${CLEAN_UP_TYPE} && ! -z ${CLEAN_UP_VARIABLE} ]]; then
|
||||||
eval ${ECHO} ${DUPLICITY} ${CLEAN_UP_TYPE} ${CLEAN_UP_VARIABLE} ${STATIC_OPTIONS} --force \
|
eval ${ECHO} ${DUPLICITY} ${CLEAN_UP_TYPE} ${CLEAN_UP_VARIABLE} ${STATIC_OPTIONS} --force \
|
||||||
${ENCRYPT} \
|
${ENCRYPT} \
|
||||||
|
|
@ -703,7 +703,7 @@ case "$COMMAND" in
|
||||||
read ANSWER
|
read ANSWER
|
||||||
if [ "$ANSWER" != "yes" ]; then
|
if [ "$ANSWER" != "yes" ]; then
|
||||||
echo "You said << ${ANSWER} >> so I am exiting now."
|
echo "You said << ${ANSWER} >> so I am exiting now."
|
||||||
echo -e "-------- END --------\n" >> ${LOGFILE}
|
echo -e "--------------------- END ---------------------\n" >> ${LOGFILE}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -728,7 +728,7 @@ case "$COMMAND" in
|
||||||
${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
|
${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
|
||||||
$ENCRYPT \
|
$ENCRYPT \
|
||||||
${DEST} | tee -a ${LOGFILE}
|
${DEST} | tee -a ${LOGFILE}
|
||||||
echo -e "-------- END --------\n" >> ${LOGFILE}
|
echo -e "--------------------- END ---------------------\n" >> ${LOGFILE}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"collection-status")
|
"collection-status")
|
||||||
|
|
@ -738,7 +738,7 @@ case "$COMMAND" in
|
||||||
${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
|
${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
|
||||||
$ENCRYPT \
|
$ENCRYPT \
|
||||||
${DEST} | tee -a ${LOGFILE}
|
${DEST} | tee -a ${LOGFILE}
|
||||||
echo -e "-------- END --------\n" >> ${LOGFILE}
|
echo -e "--------------------- END ---------------------\n" >> ${LOGFILE}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"backup")
|
"backup")
|
||||||
|
|
@ -754,7 +754,7 @@ case "$COMMAND" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo -e "-------- END DUPLICITY-BACKUP SCRIPT --------\n" >> ${LOGFILE}
|
echo -e "--------- END DUPLICITY-BACKUP SCRIPT ---------\n" >> ${LOGFILE}
|
||||||
|
|
||||||
email_logfile
|
email_logfile
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue