|
|
@ -155,7 +155,7 @@ def _run_commands(args, consistency, local_path, location, remote_path, retentio |
|
|
|
unexpanded_repository, |
|
|
|
) |
|
|
|
if args.json: |
|
|
|
sys.stdout.write(json.dumps(json_results)) |
|
|
|
sys.stdout.write(json.dumps(json_results, indent=2)) |
|
|
|
|
|
|
|
|
|
|
|
def _run_commands_on_repository( |
|
|
@ -176,14 +176,19 @@ def _run_commands_on_repository( |
|
|
|
) |
|
|
|
if args.create: |
|
|
|
logger.info('{}: Creating archive{}'.format(repository, dry_run_label)) |
|
|
|
borg_create.create_archive( |
|
|
|
output = borg_create.create_archive( |
|
|
|
args.dry_run, |
|
|
|
repository, |
|
|
|
location, |
|
|
|
storage, |
|
|
|
local_path=local_path, |
|
|
|
remote_path=remote_path, |
|
|
|
json=args.json, |
|
|
|
) |
|
|
|
if args.json: |
|
|
|
json_results.append(json.loads(output)) |
|
|
|
else: |
|
|
|
sys.stdout.write(output) |
|
|
|
if args.check: |
|
|
|
logger.info('{}: Running consistency checks'.format(repository)) |
|
|
|
borg_check.check_archives( |
|
|
|