Don't encrypt COMPLETE files nor choke if they are
May fix: https://github.com/rtucker/backuppc-archive-s3/issues/2
This commit is contained in:
parent
c2ddefb316
commit
5b4d78fea3
2 changed files with 8 additions and 2 deletions
|
@ -326,7 +326,9 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Run again to send files to the relevant queue
|
# Run again to send files to the relevant queue
|
||||||
for i in sorted(glob.glob(fileglob)):
|
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.
|
# A tar file, unencrypted, needs encrypted.
|
||||||
logger.debug("main: adding %s to gpg_queue", i)
|
logger.debug("main: adding %s to gpg_queue", i)
|
||||||
gpg_queue.put([i, secrets.gpgsymmetrickey, compPath])
|
gpg_queue.put([i, secrets.gpgsymmetrickey, compPath])
|
||||||
|
|
|
@ -88,7 +88,11 @@ def list_backups(bucket):
|
||||||
tarred = True
|
tarred = True
|
||||||
keyparts.pop()
|
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)
|
hostname = '.'.join(keyparts)
|
||||||
|
|
||||||
lastmod = time.strptime(key.last_modified, '%Y-%m-%dT%H:%M:%S.000Z')
|
lastmod = time.strptime(key.last_modified, '%Y-%m-%dT%H:%M:%S.000Z')
|
||||||
|
|
Loading…
Reference in a new issue