mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-09 14:56:10 +01:00
bug fix: incremental backups delete
This commit is contained in:
@@ -197,7 +197,9 @@ class IncJobs(multi.Thread):
|
|||||||
|
|
||||||
result = ProcessUtilities.outputExecutioner(command)
|
result = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
if result.find('removed snapshot') == -1 or result.find('deleted') == -1:
|
if result.find('removed snapshot') > -1 or result.find('deleted') > -1:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
logging.statusWriter(self.statusPath, 'Failed: %s. [5009]' % (result), 1)
|
logging.statusWriter(self.statusPath, 'Failed: %s. [5009]' % (result), 1)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -265,7 +267,9 @@ class IncJobs(multi.Thread):
|
|||||||
command = 'restic -r %s forget %s --password-file %s' % (repoLocation, self.jobid.snapshotid, self.passwordFile)
|
command = 'restic -r %s forget %s --password-file %s' % (repoLocation, self.jobid.snapshotid, self.passwordFile)
|
||||||
result = ProcessUtilities.outputExecutioner(command)
|
result = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
if result.find('removed snapshot') == -1 or result.find('deleted') == -1:
|
if result.find('removed snapshot') > -1 or result.find('deleted') > -1:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
logging.statusWriter(self.statusPath, 'Failed: %s. [5009]' % (result), 1)
|
logging.statusWriter(self.statusPath, 'Failed: %s. [5009]' % (result), 1)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -322,7 +326,10 @@ class IncJobs(multi.Thread):
|
|||||||
command = 'export PATH=${PATH}:/usr/bin && restic -r %s:%s forget %s --password-file %s' % (
|
command = 'export PATH=${PATH}:/usr/bin && restic -r %s:%s forget %s --password-file %s' % (
|
||||||
self.jobid.destination, repoLocation, self.jobid.snapshotid, self.passwordFile)
|
self.jobid.destination, repoLocation, self.jobid.snapshotid, self.passwordFile)
|
||||||
result = ProcessUtilities.outputExecutioner(command)
|
result = ProcessUtilities.outputExecutioner(command)
|
||||||
if result.find('removed snapshot') == -1 or result.find('deleted') == -1:
|
|
||||||
|
if result.find('removed snapshot') > -1 or result.find('deleted') > -1:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
logging.statusWriter(self.statusPath, 'Failed: %s. [5009]' % (result), 1)
|
logging.statusWriter(self.statusPath, 'Failed: %s. [5009]' % (result), 1)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user