From 6c09189b774af32c97b84e93b8c5710851c5851f Mon Sep 17 00:00:00 2001 From: Olivier MEDOC Date: Wed, 14 Aug 2013 10:19:15 +0200 Subject: [PATCH] backup: improved performance by optimizing tar and gpg options --- dom0/qvm-core/qubesutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom0/qvm-core/qubesutils.py b/dom0/qvm-core/qubesutils.py index 8aba4943..642414cf 100644 --- a/dom0/qvm-core/qubesutils.py +++ b/dom0/qvm-core/qubesutils.py @@ -1046,8 +1046,8 @@ def backup_do_copy(appvm, base_backup_dir, files_to_backup, progress_callback = retcode = vm.run(command = "cat > {0}".format(dest_dir + file["basename"]), passio_popen = True) if encrypt: - compressor = subprocess.Popen (["tar", "-PcO",'--checkpoint=10000', file["path"]],stdout=subprocess.PIPE) - encryptor = subprocess.Popen (["gpg2", "-ac", "--force-mdc", "-o-"], stdin=compressor.stdout, stdout=retcode.stdin) + compressor = subprocess.Popen (["tar", "-PcO",'--sparse','--checkpoint=10000', file["path"]],stdout=subprocess.PIPE) + encryptor = subprocess.Popen (["gpg2", "-c", "--force-mdc", "-o-"], stdin=compressor.stdout, stdout=retcode.stdin) encryptor.wait() if encryptor.returncode != 0: