Skip to content

Commit f9c915b

Browse files
committed
CP-14: Admin Back Up Create Back Up
1 parent efb3eb8 commit f9c915b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

plogical/backupUtilities.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,10 +2013,11 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
20132013

20142014
## Backing up databases
20152015

2016-
command = 'chown cyberpanel:cyberpanel %s' % (result[2])
2017-
ProcessUtilities.executioner(command)
2016+
if not os.path.islink(finalMetaPath):
2017+
command = 'chown cyberpanel:cyberpanel %s' % (finalMetaPath)
2018+
ProcessUtilities.executioner(command)
20182019

2019-
backupMetaData = ElementTree.parse(result[2])
2020+
backupMetaData = ElementTree.parse(finalMetaPath)
20202021

20212022
databases = backupMetaData.findall('Databases/database')
20222023

@@ -2038,7 +2039,7 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
20382039
execPath = "sudo nice -n 10 /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/backupUtilities.py"
20392040
execPath = execPath + " BackupRoot --tempStoragePath " + tempStoragePath + " --backupName " \
20402041
+ backupName + " --backupPath " + backupPath + ' --backupDomain ' + backupDomain + ' --metaPath %s' % (
2041-
result[2])
2042+
finalMetaPath)
20422043

20432044
ProcessUtilities.executioner(execPath, 'root')
20442045
else:
@@ -2047,7 +2048,7 @@ def submitBackupCreation(tempStoragePath, backupName, backupPath, backupDomain):
20472048
command = 'chown -R %s:%s %s' % (website.externalApp, website.externalApp, backupPath)
20482049
ProcessUtilities.executioner(command)
20492050

2050-
command = 'rm -f %s' % (result[2])
2051+
command = 'rm -f %s' % (finalMetaPath)
20512052
ProcessUtilities.executioner(command, 'cyberpanel')
20522053

20532054
except BaseException as msg:

0 commit comments

Comments
 (0)