add a way to dump backup status from the command line

This commit is contained in:
Joshua Tauberer 2015-11-26 14:34:07 +00:00
parent b32cb6229b
commit 161d096139
1 changed files with 5 additions and 0 deletions

View File

@ -437,6 +437,11 @@ if __name__ == "__main__":
# are readable, and b) report if they are up to date.
run_duplicity_verification()
elif sys.argv[-1] == "--status":
# Show backup status.
ret = backup_status(load_environment())
print(rtyaml.dump(ret["backups"]))
else:
# Perform a backup. Add --full to force a full backup rather than
# possibly performing an incremental backup.