From 9fad6f5f38d6791dd0e145301182b450b2c0e781 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Wed, 4 Dec 2019 03:33:30 +0100 Subject: [PATCH] Note about Popen buffer size --- restic_compose_backup/restic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/restic_compose_backup/restic.py b/restic_compose_backup/restic.py index 030ec9c..4f84e53 100644 --- a/restic_compose_backup/restic.py +++ b/restic_compose_backup/restic.py @@ -40,6 +40,9 @@ def backup_from_stdin(repository: str, filename: str, source_command: List[str]) ]) # pipe source command into dest command + # NOTE: Using the default buffer size: io.DEFAULT_BUFFER_SIZE = 8192 + # We might want to tweak that to speed up large dumps. + # Actual tests tests must be done. source_process = Popen(source_command, stdout=PIPE) dest_process = Popen(dest_command, stdin=source_process.stdout, stdout=PIPE, stderr=PIPE) stdout, stderr = dest_process.communicate()