diff --git a/BackupPC_archiveHost_s3 b/BackupPC_archiveHost_s3 index 3c65e02..ce91aeb 100755 --- a/BackupPC_archiveHost_s3 +++ b/BackupPC_archiveHost_s3 @@ -326,7 +326,9 @@ if __name__ == '__main__': # Run again to send files to the relevant queue for i in sorted(glob.glob(fileglob)): - if secrets.gpgsymmetrickey and not i.endswith('.gpg'): + if (secrets.gpgsymmetrickey + and not i.endswith('.gpg') + and not i.endswith('.COMPLETE')): # A tar file, unencrypted, needs encrypted. logger.debug("main: adding %s to gpg_queue", i) gpg_queue.put([i, secrets.gpgsymmetrickey, compPath]) diff --git a/backup-manager.py b/backup-manager.py index ab73de6..2d84813 100755 --- a/backup-manager.py +++ b/backup-manager.py @@ -88,7 +88,11 @@ def list_backups(bucket): tarred = True keyparts.pop() - backupnum = int(keyparts.pop()) + nextpart = keyparts.pop() + if nextpart == 'COMPLETE': + print("Stray file: %s" % key.key) + continue + backupnum = int(nextpart) hostname = '.'.join(keyparts) lastmod = time.strptime(key.last_modified, '%Y-%m-%dT%H:%M:%S.000Z')