From 77b1ce4e2081f28755a8ee68415e96dca350d8c3 Mon Sep 17 00:00:00 2001 From: deajan Date: Wed, 10 Sep 2025 13:47:18 +0200 Subject: [PATCH] CLI: dump should output binary data straight to stdout --- npbackup/restic_wrapper/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/npbackup/restic_wrapper/__init__.py b/npbackup/restic_wrapper/__init__.py index c18d757..04e9c96 100644 --- a/npbackup/restic_wrapper/__init__.py +++ b/npbackup/restic_wrapper/__init__.py @@ -1379,6 +1379,9 @@ class ResticRunner: # Also, don't use poller method which is too slow result, output = self.executor(cmd, encoding=False, method="monitor") if result: + # We need to write binary data directly to stdout on success + # Dump should only be used by CLI + sys.stdout.buffer.write(output) msg = f"File {path} successfully dumped" else: msg = f"Cannot dump file {path}:\n {output}"