usman@cyberpersons.com
2023-03-26 13:24:45 +05:00

View File

@@ -492,12 +492,13 @@ class IncScheduler(multi.Thread):
if destinationConfig['type'] == 'local':
if jobConfig[IncScheduler.frequency] == type:
finalPath = '%s/%s' % (destinationConfig['path'].rstrip('/'), currentTime)
command = 'mkdir -p %s' % (finalPath)
ProcessUtilities.executioner(command)
if jobConfig[IncScheduler.frequency] == type:
### Check if an old job prematurely killed, then start from there.
try:
oldJobContinue = 1
@@ -600,16 +601,19 @@ Automatic backup failed for %s on %s.
backupjob.config = json.dumps(jobConfig)
backupjob.save()
else:
if jobConfig[IncScheduler.frequency] == type:
import subprocess
import shlex
finalPath = '%s/%s' % (destinationConfig['path'].rstrip('/'), currentTime)
command = "ssh -o StrictHostKeyChecking=no -p " + destinationConfig[
'port'] + " -i /root/.ssh/cyberpanel " + destinationConfig['username'] + "@" + destinationConfig[
'port'] + " -i /root/.ssh/cyberpanel " + destinationConfig['username'] + "@" + \
destinationConfig[
'ip'] + " mkdir -p %s" % (finalPath)
subprocess.call(shlex.split(command))
if jobConfig[IncScheduler.frequency] == type:
### Check if an old job prematurely killed, then start from there.
# try:
# oldJobContinue = 1