alfresco-backup-and-recovery-tool
alfresco-backup-and-recovery-tool copied to clipboard
Log lines written always with the same time
I have noticed that the log file has all the lines with the same moment, like 2017-06-14-22:00:01
My backup is scheduled using cron, once a day, always on 10 PM, and all the lines keep repeating the moment it started. This backup can take more than one hour, based on the statistics output for the files backup, the latest step:
--------------[ Backup Statistics ]-------------- StartTime 1497491193.45 (Wed Jun 14 22:46:33 2017) EndTime 1497491202.35 (Wed Jun 14 22:46:42 2017)
oops! That's seem to be the way I set variables. I'm not really convinced with the way it handles logs. It should be a better way.
Probably adding something like this:
#!/bin/bash -x
exec > /var/log/alfresco-bart.log 2>&1
I have just found the script bellow, where the author uses a different syntax I would like to try, so this is why I am reopening this issue.
http://www.contcentric.com/alfresco-backup/
FORMAT="%m-%d-%Y-%H-%M-%S"
echo [$(date +${FORMAT})]"Performing Database Backup"
echo [$(date +${FORMAT})]"Backup Completed"