Skip to content
Permalink
Browse files
bug fix: add incremental destination
  • Loading branch information
usmannasir committed Apr 28, 2020
1 parent 6a9c774 commit 3f1468c6735dab5d5d7fc817cc6622f01343de78
Showing 6 changed files with 13 additions and 4 deletions.
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# -*- coding: utaddDestinationf-8 -*-

from django.shortcuts import render
from plogical.acl import ACLManager
@@ -102,8 +102,14 @@ def addDestination(request):
execPath = execPath + " submitDestinationCreation --ipAddress " + ipAddress + " --password " \
+ password + " --port " + port

if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(execPath)

output = ProcessUtilities.outputExecutioner(execPath)

if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(output)

if output.find('1,') > -1:

content = '%s\n%s' % (ipAddress, port)
@@ -159,6 +159,7 @@ check_root

echo -e "\nChecking OS..."
OUTPUT=$(cat /etc/*release)

if echo $OUTPUT | grep -q "CentOS Linux 7" ; then
echo -e "\nDetecting CentOS 7.X...\n"
SERVER_OS="CentOS7"
@@ -196,6 +196,9 @@ def sendBackup(backupPath, IPAddress, backupLogPath , port='22', user='root'):
command = "sudo scp -o StrictHostKeyChecking=no -P "+port+" -i /root/.ssh/cyberpanel " + backupPath + " " + user + "@" + IPAddress+":~/backup/" + ipAddressLocal + "/" + time.strftime("%a-%b") + "/"
subprocess.call(shlex.split(command), stdout=writeToFile)

if os.path.exists(ProcessUtilities.debugPath):
logging.CyberCPLogFileWriter.writeToFile(command)

## Remove backups already sent to remote destinations

os.remove(backupPath)
@@ -493,7 +493,6 @@ def BackupRoot(tempStoragePath, backupName, backupPath, metaPath=None):
items.status = 1
items.size = totalSize
items.save()
logging.CyberCPLogFileWriter.writeToFile(' again size: %s' % (totalSize))
except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile('%s. [backupRoot:499]' % str(msg))
for items in backupObs:
@@ -416,7 +416,7 @@ app.controller('restoreWebsiteControl', function ($scope, $http, $timeout) {
});


//*** Resotre site ends here ***///
//*** Restore site ends here ***///


///** Backup Destination ***//
@@ -448,6 +448,7 @@ app.controller('backupDestinations', function ($scope, $http, $timeout) {
var data = {
IPAddress: $scope.IPAddress,
password: $scope.password,
user: $scope.user,
backupSSHPort: $scope.backupSSHPort,
};

@@ -1479,7 +1479,6 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader,
// Download files

$scope.downloadFile = function () {

url = "/filemanager/downloadFile";
var downloadURL = $scope.currentPath + "/" + allFilesAndFolders[0];
window.location.href = url + '?domainName=' + domainName + '&fileToDownload=' + downloadURL;

0 comments on commit 3f1468c

Please sign in to comment.