From 8725bdefb044d1e33973039979775cd47e9760f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 27 Nov 2015 03:47:04 +0100 Subject: [PATCH] backup: add qvm-backup --compress-filter option Custom compression program was supported for a long time. But there was no option to use it... Fixes QubesOS/qubes-issues#1459 --- qvm-tools/qvm-backup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qvm-tools/qvm-backup b/qvm-tools/qvm-backup index dff4e9e5..aa69f9c6 100755 --- a/qvm-tools/qvm-backup +++ b/qvm-tools/qvm-backup @@ -63,6 +63,10 @@ def main(): "list-message-digest-algorithms'") parser.add_option ("-z", "--compress", action="store_true", dest="compress", default=False, help="Compress the backup") + parser.add_option ("-Z", "--compress-filter", action="store", + dest="compress_filter", default=False, + help="Compress the backup using specified filter " + "program (default: gzip)") parser.add_option ("--debug", action="store_true", dest="debug", default=False, help="Enable (a lot of) debug output") @@ -181,7 +185,7 @@ def main(): backup_do(base_backup_dir, files_to_backup, passphrase, progress_callback=print_progress, encrypted=options.encrypt, - compressed=options.compress, + compressed=options.compress_filter or options.compress, appvm=appvm, **kwargs) except QubesException as e: print >>sys.stderr, "ERROR: %s" % str(e)