over to hsn

This commit is contained in:
usman@cyberpersons.com
2023-03-01 15:03:40 +05:00
parent 2a48d3a257
commit 93ad509361

View File

@@ -86,6 +86,12 @@ pass = {ObsecurePassword}
if status == CPBackupsV2.FAILED: if status == CPBackupsV2.FAILED:
self.buv2.website.BackupLock = 0 self.buv2.website.BackupLock = 0
self.buv2.website.save() self.buv2.website.save()
### delete leftover dbs if backup fails
command = f'rm -f {self.FinalPathRuctic}/*.sql'
ProcessUtilities.executioner(command, None, True)
elif status == CPBackupsV2.COMPLETED: elif status == CPBackupsV2.COMPLETED:
self.buv2.website.BackupLock = 0 self.buv2.website.BackupLock = 0
self.buv2.website.save() self.buv2.website.save()
@@ -419,6 +425,9 @@ pass = {ObsecurePassword}
self.BackupConfig(SnapShotID) self.BackupConfig(SnapShotID)
command = f'chown cyberpanel:cyberpanel {self.FinalPathRuctic}'
ProcessUtilities.executioner(command)
except BaseException as msg: except BaseException as msg:
self.UpdateStatus(f'Backup failed as no snapshot id found, error: {str(msg)}', self.UpdateStatus(f'Backup failed as no snapshot id found, error: {str(msg)}',
CPBackupsV2.FAILED) CPBackupsV2.FAILED)