mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
Add archive-dir argument to collection-status
This commit is contained in:
parent
43fb7fe635
commit
fa0dd684da
@ -31,7 +31,11 @@ def backup_status(env):
|
|||||||
# Use the number of volumes to estimate the size.
|
# Use the number of volumes to estimate the size.
|
||||||
config = get_backup_config()
|
config = get_backup_config()
|
||||||
now = datetime.datetime.now(dateutil.tz.tzlocal())
|
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):
|
def reldate(date, ref, clip):
|
||||||
if ref < date: return clip
|
if ref < date: return clip
|
||||||
rd = dateutil.relativedelta.relativedelta(ref, date)
|
rd = dateutil.relativedelta.relativedelta(ref, date)
|
||||||
@ -57,16 +61,13 @@ def backup_status(env):
|
|||||||
shell('check_call', [
|
shell('check_call', [
|
||||||
"/usr/bin/duplicity",
|
"/usr/bin/duplicity",
|
||||||
"collection-status",
|
"collection-status",
|
||||||
|
"--archive-dir", backup_cache_dir,
|
||||||
"--log-file", os.path.join(backup_root, "duplicity_status"),
|
"--log-file", os.path.join(backup_root, "duplicity_status"),
|
||||||
"--gpg-options", "--cipher-algo=AES256",
|
"--gpg-options", "--cipher-algo=AES256",
|
||||||
config["target"],
|
config["target"],
|
||||||
],
|
],
|
||||||
get_env())
|
get_env())
|
||||||
|
|
||||||
|
|
||||||
backups = { }
|
|
||||||
backup_dir = os.path.join(backup_root, 'encrypted')
|
|
||||||
|
|
||||||
# Parse backup data from status file
|
# Parse backup data from status file
|
||||||
with open(os.path.join(backup_root, "duplicity_status"),'r') as status_file:
|
with open(os.path.join(backup_root, "duplicity_status"),'r') as status_file:
|
||||||
for line in status_file:
|
for line in status_file:
|
||||||
|
Loading…
Reference in New Issue
Block a user