library/roles/postgresql/files/postgresql-backup.cron: Log the start and end backup date.
This commit is contained in:
parent
d3d621802f
commit
31b56fd211
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue