mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
bug fix: add incremental destination
This commit is contained in:
@@ -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 @@ class backupSchedule:
|
||||
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 @@ class backupUtilities:
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user