From fa0dd684da05a800da867782f44106292086f833 Mon Sep 17 00:00:00 2001 From: Leo Koppelkamm Date: Mon, 27 Jul 2015 22:13:28 +0200 Subject: [PATCH] Add archive-dir argument to collection-status --- management/backup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/management/backup.py b/management/backup.py index b86b70f3..8448bbce 100755 --- a/management/backup.py +++ b/management/backup.py @@ -31,7 +31,11 @@ def backup_status(env): # Use the number of volumes to estimate the size. config = get_backup_config() now = datetime.datetime.now(dateutil.tz.tzlocal()) - + + backups = { } + backup_dir = os.path.join(backup_root, 'encrypted') + backup_cache_dir = os.path.join(backup_root, 'cache') + def reldate(date, ref, clip): if ref < date: return clip rd = dateutil.relativedelta.relativedelta(ref, date) @@ -57,16 +61,13 @@ def backup_status(env): shell('check_call', [ "/usr/bin/duplicity", "collection-status", + "--archive-dir", backup_cache_dir, "--log-file", os.path.join(backup_root, "duplicity_status"), "--gpg-options", "--cipher-algo=AES256", config["target"], ], get_env()) - - backups = { } - backup_dir = os.path.join(backup_root, 'encrypted') - # Parse backup data from status file with open(os.path.join(backup_root, "duplicity_status"),'r') as status_file: for line in status_file: