CLI: dump should output binary data straight to stdout

This commit is contained in:
deajan 2025-09-10 13:47:18 +02:00
parent b206ba9acf
commit 77b1ce4e20

View file

@ -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}"