Skip to content

Commit 3f1468c

Browse files
committed
bug fix: add incremental destination
1 parent 6a9c774 commit 3f1468c

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

IncBackups/views.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: utaddDestinationf-8 -*-
22

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

105+
if os.path.exists(ProcessUtilities.debugPath):
106+
logging.writeToFile(execPath)
107+
105108
output = ProcessUtilities.outputExecutioner(execPath)
106109

110+
if os.path.exists(ProcessUtilities.debugPath):
111+
logging.writeToFile(output)
112+
107113
if output.find('1,') > -1:
108114

109115
content = '%s\n%s' % (ipAddress, port)

cyberpanel_upgrade.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ check_root
159159

160160
echo -e "\nChecking OS..."
161161
OUTPUT=$(cat /etc/*release)
162+
162163
if echo $OUTPUT | grep -q "CentOS Linux 7" ; then
163164
echo -e "\nDetecting CentOS 7.X...\n"
164165
SERVER_OS="CentOS7"

plogical/backupSchedule.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ def sendBackup(backupPath, IPAddress, backupLogPath , port='22', user='root'):
196196
command = "sudo scp -o StrictHostKeyChecking=no -P "+port+" -i /root/.ssh/cyberpanel " + backupPath + " " + user + "@" + IPAddress+":~/backup/" + ipAddressLocal + "/" + time.strftime("%a-%b") + "/"
197197
subprocess.call(shlex.split(command), stdout=writeToFile)
198198

199+
if os.path.exists(ProcessUtilities.debugPath):
200+
logging.CyberCPLogFileWriter.writeToFile(command)
201+
199202
## Remove backups already sent to remote destinations
200203

201204
os.remove(backupPath)

plogical/backupUtilities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ def BackupRoot(tempStoragePath, backupName, backupPath, metaPath=None):
493493
items.status = 1
494494
items.size = totalSize
495495
items.save()
496-
logging.CyberCPLogFileWriter.writeToFile(' again size: %s' % (totalSize))
497496
except BaseException as msg:
498497
logging.CyberCPLogFileWriter.writeToFile('%s. [backupRoot:499]' % str(msg))
499498
for items in backupObs:

static/backup/backup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ app.controller('restoreWebsiteControl', function ($scope, $http, $timeout) {
416416
});
417417

418418

419-
//*** Resotre site ends here ***///
419+
//*** Restore site ends here ***///
420420

421421

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

static/filemanager/js/fileManager.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,6 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader,
14791479
// Download files
14801480

14811481
$scope.downloadFile = function () {
1482-
14831482
url = "/filemanager/downloadFile";
14841483
var downloadURL = $scope.currentPath + "/" + allFilesAndFolders[0];
14851484
window.location.href = url + '?domainName=' + domainName + '&fileToDownload=' + downloadURL;

0 commit comments

Comments
 (0)