mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 02:16:50 +02:00
Bug fix to Remote backups.
This commit is contained in:
@@ -63,7 +63,7 @@ class backupSchedule:
|
||||
@staticmethod
|
||||
def sendBackup(backupPath, IPAddress, writeToFile,port):
|
||||
try:
|
||||
command = "sudo scp -P "+port+" -i /root/.ssh/cyberpanel " + backupPath + " root@"+IPAddress+":/home/backup/"+ time.strftime("%a-%b") + "/"
|
||||
command = "sudo scp -o StrictHostKeyChecking=no -P "+port+" -i /root/.ssh/cyberpanel " + backupPath + " root@"+IPAddress+":/home/backup/"+ time.strftime("%a-%b") + "/"
|
||||
subprocess.call(shlex.split(command), stdout=writeToFile)
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startBackup]")
|
||||
|
||||
@@ -16,7 +16,7 @@ class remoteTransferUtilities:
|
||||
@staticmethod
|
||||
def writeAuthKey(pathToKey):
|
||||
try:
|
||||
authorized_keys = "/root/.ssh/authorized_keys"
|
||||
authorized_keys = os.path.join("/root",".ssh","authorized_keys")
|
||||
presenseCheck = 0
|
||||
|
||||
try:
|
||||
@@ -209,7 +209,7 @@ class remoteTransferUtilities:
|
||||
try:
|
||||
## complete path is a path to the file need to send
|
||||
|
||||
command = "sudo scp -i /root/.ssh/cyberpanel " + completedPathToSend + " root@" + IPAddress + ":/home/backup/transfer-" + folderNumber + "/"
|
||||
command = "sudo scp -o StrictHostKeyChecking=no -i /root/.ssh/cyberpanel " + completedPathToSend + " root@" + IPAddress + ":/home/backup/transfer-" + folderNumber + "/"
|
||||
subprocess.call(shlex.split(command), stdout=writeToFile)
|
||||
|
||||
except BaseException, msg:
|
||||
|
||||
Reference in New Issue
Block a user