bug fix: remove backup and meta directories from incremental backups

This commit is contained in:
Usman Nasir
2021-05-09 17:55:05 +05:00
parent c430806537
commit 698d85a3e8

View File

@@ -146,8 +146,8 @@ class IncJobs(multi.Thread):
backupExcludesFile = '/home/%s/backup-exclude.conf' % (self.website.domain)
resticBackupExcludeCMD = ' --exclude-file=%s' % (backupExcludesFile)
command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s backup %s --password-file %s' % (
key, secret, self.website.domain, backupPath, self.passwordFile)
command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s backup %s --password-file %s --exclude /home/%s/backup --exclude /home/%s/incbackup' % (
key, secret, self.website.domain, backupPath, self.passwordFile, self.website.domain, self.website.domain)
# If /home/%s/backup-exclude.conf file exists lets pass this to restic by appending the command to end.
if os.path.isfile(backupExcludesFile):
@@ -237,8 +237,8 @@ class IncJobs(multi.Thread):
backupExcludesFile = '/home/%s/backup-exclude.conf' % (self.website.domain)
resticBackupExcludeCMD = ' --exclude-file=%s' % (backupExcludesFile)
command = 'restic -r %s backup %s --password-file %s --exclude %s' % (
self.repoPath, backupPath, self.passwordFile, self.repoPath)
command = 'restic -r %s backup %s --password-file %s --exclude %s --exclude /home/%s/backup' % (
self.repoPath, backupPath, self.passwordFile, self.repoPath, self.website.domain)
# If /home/%s/backup-exclude.conf file exists lets pass this to restic by appending the command to end.
if os.path.isfile(backupExcludesFile):
command = command + resticBackupExcludeCMD
@@ -298,8 +298,8 @@ class IncJobs(multi.Thread):
backupExcludesFile = '/home/%s/backup-exclude.conf' % (self.website.domain)
resticBackupExcludeCMD = ' --exclude-file=%s' % (backupExcludesFile)
remotePath = '/home/backup/%s' % (self.website.domain)
command = 'export PATH=${PATH}:/usr/bin && restic -r %s:%s backup %s --password-file %s --exclude %s' % (
self.backupDestinations, remotePath, backupPath, self.passwordFile, self.repoPath)
command = 'export PATH=${PATH}:/usr/bin && restic -r %s:%s backup %s --password-file %s --exclude %s --exclude /home/%s/backup' % (
self.backupDestinations, remotePath, backupPath, self.passwordFile, self.repoPath, self.website.domain)
# If /home/%s/backup-exclude.conf file exists lets pass this to restic by appending the command to end.
if os.path.isfile(backupExcludesFile):
command = command + resticBackupExcludeCMD