CP-16: Admin Back Up Start Transfer

This commit is contained in:
Usman Nasir
2021-08-13 12:35:47 +05:00
3 changed files with 12 additions and 1 deletions

View File

@@ -69,6 +69,9 @@ class remoteTransferUtilities:
if not os.path.exists(destination):
os.makedirs(destination)
command = 'chmod 600 %s' % (destination)
ProcessUtilities.executioner(command)
writeToFile = open(backupLogPath, "w+")
writeToFile.writelines("############################\n")
@@ -144,6 +147,11 @@ class remoteTransferUtilities:
completePathToBackupFile = retValue[1] + '.tar.gz'
### change permissions of backup file
command = 'chmod 600 %s' % (completePathToBackupFile)
ProcessUtilities.executioner(command)
## move the generated backup file to specified destination
if os.path.exists(completePathToBackupFile):

View File

@@ -106,7 +106,7 @@ class Upgrade:
FNULL = open(os.devnull, 'w')
count = 0
while True:
res = subprocess.call(shlex.split(command), stdout=FNULL, stderr=subprocess.STDOUT)
res = subprocess.call(shlex.split(command), stderr=subprocess.STDOUT)
if res != 0:
count = count + 1
Upgrade.stdOut(component + ' failed, trying again, try number: ' + str(count), 0)