@@ -146,8 +146,8 @@ def awsFunction(self, fType, backupPath=None, snapshotID=None, bType=None, delet
146146 backupExcludesFile = '/home/%s/backup-exclude.conf' % (self .website .domain )
147147 resticBackupExcludeCMD = ' --exclude-file=%s' % (backupExcludesFile )
148148
149- command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s backup %s --password-file %s' % (
150- key , secret , self .website .domain , backupPath , self .passwordFile )
149+ 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 ' % (
150+ key , secret , self .website .domain , backupPath , self .passwordFile , self . website . domain , self . website . domain )
151151
152152 # If /home/%s/backup-exclude.conf file exists lets pass this to restic by appending the command to end.
153153 if os .path .isfile (backupExcludesFile ):
@@ -237,8 +237,8 @@ def localFunction(self, backupPath, type, restore=None, delete=None):
237237 backupExcludesFile = '/home/%s/backup-exclude.conf' % (self .website .domain )
238238 resticBackupExcludeCMD = ' --exclude-file=%s' % (backupExcludesFile )
239239
240- command = 'restic -r %s backup %s --password-file %s --exclude %s' % (
241- self .repoPath , backupPath , self .passwordFile , self .repoPath )
240+ command = 'restic -r %s backup %s --password-file %s --exclude %s --exclude /home/%s/backup ' % (
241+ self .repoPath , backupPath , self .passwordFile , self .repoPath , self . website . domain )
242242 # If /home/%s/backup-exclude.conf file exists lets pass this to restic by appending the command to end.
243243 if os .path .isfile (backupExcludesFile ):
244244 command = command + resticBackupExcludeCMD
@@ -298,8 +298,8 @@ def sftpFunction(self, backupPath, type, restore=None, delete=None):
298298 backupExcludesFile = '/home/%s/backup-exclude.conf' % (self .website .domain )
299299 resticBackupExcludeCMD = ' --exclude-file=%s' % (backupExcludesFile )
300300 remotePath = '/home/backup/%s' % (self .website .domain )
301- command = 'export PATH=${PATH}:/usr/bin && restic -r %s:%s backup %s --password-file %s --exclude %s' % (
302- self .backupDestinations , remotePath , backupPath , self .passwordFile , self .repoPath )
301+ command = 'export PATH=${PATH}:/usr/bin && restic -r %s:%s backup %s --password-file %s --exclude %s --exclude /home/%s/backup ' % (
302+ self .backupDestinations , remotePath , backupPath , self .passwordFile , self .repoPath , self . website . domain )
303303 # If /home/%s/backup-exclude.conf file exists lets pass this to restic by appending the command to end.
304304 if os .path .isfile (backupExcludesFile ):
305305 command = command + resticBackupExcludeCMD
0 commit comments