library/roles/postgresql/files/postgresql-backup.cron: Log the start and end backup date.

This commit is contained in:
Andrea Dell'Amico 2016-11-28 18:40:06 +01:00
parent d3d621802f
commit 31b56fd211
1 changed files with 4 additions and 2 deletions

View File

@ -40,9 +40,11 @@ if [ $PG_BACKUP_ENABLED == 'True' ] ; then
if [ ! -d $LOG_DIR ] ; then
mkdir -p $LOG_DIR
fi
echo "Starting the backup procedure" > $LOG_FILE
DATE_START=$( date )
echo "$DATE_START: Starting the backup procedure" > $LOG_FILE
$PG_BCK_BIN >> $LOG_FILE 2>&1
echo "Backup procedure finished" >> $LOG_FILE
DATE_END=$( date )
echo "$DATE_END: Backup procedure finished" >> $LOG_FILE
fi
else
echo "Postgresql backups administratively disabled" > $LOG_FILE