prevent local backup from running multiple processes

This commit is contained in:
Usman Nasir
2020-05-22 16:03:49 +05:00
parent 5d2255ecf2
commit df4cea0ebb
2 changed files with 21 additions and 2 deletions

View File

@@ -228,6 +228,13 @@ class backupSchedule:
backupLogPath = "/usr/local/lscp/logs/backup_log."+time.strftime("%m.%d.%Y_%H-%M-%S")
jobSuccessSites = 0
jobFailedSites = 0
backupSchedule.backupLog = BackupJob(logFile=backupLogPath, location=backupSchedule.REMOTE,
jobSuccessSites=jobSuccessSites, jobFailedSites=jobFailedSites)
backupSchedule.backupLog.save()
backupSchedule.remoteBackupLogging(backupLogPath,"#################################################")
backupSchedule.remoteBackupLogging(backupLogPath," Backup log for: " +time.strftime("%m.%d.%Y_%H-%M-%S"))
backupSchedule.remoteBackupLogging(backupLogPath,"#################################################\n")