diff --git a/backup.sh b/backup.sh index 86f1ebda632769447c3f1a85c173c06f38381d60..a23d99cce377e4df1b44f1b53fd655f6f9f60154 100755 --- a/backup.sh +++ b/backup.sh @@ -197,6 +197,11 @@ EOFbackupinfo ls -l "$JOB_LOGFILE" echo + echo "INFO: $(date) - compress older logs" + echo find "${DIR_LOGS}" -name "*.log" -mtime +2 -print -exec gzip {} \; + find "${DIR_LOGS}" -name "*.log" -mtime +2 -print -exec gzip {} \; + echo + echo "INFO: $(date) - cleanup logs" echo find "${DIR_LOGS}" -mtime +28 -delete -print find "${DIR_LOGS}" -mtime +28 -delete -print