Bug fix to local backup generation.

This commit is contained in:
usmannasir
2018-03-26 20:39:56 +05:00
parent d9d3dd1149
commit 9fc0994d59
2 changed files with 23 additions and 7 deletions

View File

@@ -33,13 +33,18 @@ class backupScheduleLocal:
writeToFile.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "]" + " Waiting for backup to complete.. " + "\n")
if data['status'] == 0:
if data['backupStatus'] == 0:
writeToFile.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "]" + " Backup Completed for: " +virtualHost + "\n")
"%I-%M-%S-%a-%b-%Y") + "]" + "An error occurred, Error message: " + data['error_message'] + "\n")
break
elif data['abort'] == 1:
writeToFile.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "]" + " Backup Completed for: " + virtualHost + "\n")
writeToFile.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "]" + " #############################################" + "\n")
"%I-%M-%S-%a-%b-%Y") + "]" + " #############################################" + "\n")
break
except BaseException,msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startBackup]")