Merge branch 'v2.3.4-dev' of https://github.com/usmannasir/cyberpanel into v2.3.4-dev

This commit is contained in:
unknown
2023-03-01 15:53:45 +05:00

View File

@@ -86,6 +86,12 @@ pass = {ObsecurePassword}
if status == CPBackupsV2.FAILED:
self.buv2.website.BackupLock = 0
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:
self.buv2.website.BackupLock = 0
self.buv2.website.save()
@@ -419,6 +425,9 @@ pass = {ObsecurePassword}
self.BackupConfig(SnapShotID)
command = f'chown cyberpanel:cyberpanel {self.FinalPathRuctic}'
ProcessUtilities.executioner(command)
except BaseException as msg:
self.UpdateStatus(f'Backup failed as no snapshot id found, error: {str(msg)}',
CPBackupsV2.FAILED)