bug fix: inc backups
This commit is contained in:
parent
2aa041ba1b
commit
afabe2dfa8
|
|
@ -775,7 +775,6 @@ def createV2BackupSetup(request):
|
|||
return redirect(loadLoginPage)
|
||||
|
||||
def CreateV2BackupButton(request):
|
||||
import re
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
data = json.loads(request.body)
|
||||
|
|
@ -795,6 +794,7 @@ def CreateV2BackupButton(request):
|
|||
extra_args = {}
|
||||
extra_args['function'] = 'InitiateBackup'
|
||||
extra_args['website'] = Selectedwebsite
|
||||
extra_args['domain'] = Selectedwebsite
|
||||
extra_args['BasePath'] = '/home/backup'
|
||||
extra_args['BackendName'] = Selectedrepo
|
||||
extra_args['BackupData'] = data['websiteData'] if 'websiteData' in data else False
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ token = {token}
|
|||
command = f"chmod 600 {self.ConfigFilePath}"
|
||||
ProcessUtilities.executioner(command, self.website.externalApp)
|
||||
|
||||
|
||||
@staticmethod
|
||||
def FetchCurrentTimeStamp():
|
||||
import time
|
||||
|
|
@ -217,12 +216,18 @@ token = {token}
|
|||
snapshots= f'{snapshots} {snapshot}'
|
||||
|
||||
|
||||
command = f'rustic -r {self.repo} merge {snapshots} --password "" --json 2>/dev/null'
|
||||
result = json.loads(ProcessUtilities.outputExecutioner(command, self.website.externalApp, True).rstrip('\n'))
|
||||
command = f'rustic -r {self.repo} merge {snapshots} --password "" --json'
|
||||
result = ProcessUtilities.outputExecutioner(command, self.website.externalApp, True)
|
||||
|
||||
if os.path.exists(ProcessUtilities.debugPath):
|
||||
logging.CyberCPLogFileWriter.writeToFile(result)
|
||||
|
||||
command = f'rustic -r {self.repo} forget {snapshots} --password ""'
|
||||
result = ProcessUtilities.outputExecutioner(command, self.website.externalApp, True)
|
||||
|
||||
if os.path.exists(ProcessUtilities.debugPath):
|
||||
logging.CyberCPLogFileWriter.writeToFile(result)
|
||||
|
||||
def InitiateBackup(self):
|
||||
|
||||
from websiteFunctions.models import Websites, Backupsv2
|
||||
|
|
|
|||
Loading…
Reference in New Issue