Skip to content

Commit 97d6951

Browse files
committed
Add the --fast option for gzip
1 parent e0a4bed commit 97d6951

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.2
1+
1.4.4

mongodb_consistent_backup/Archive/Tar/TarThread.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ def run(self):
3232
backup_base_name = os.path.basename(self.backup_dir)
3333

3434
log_msg = "Archiving directory: %s" % self.backup_dir
35-
cmd_flags = ["-C", backup_base_dir, "-c", "-f", self.output_file, "--remove-files"]
35+
cmd_flags = ["-C", backup_base_dir, "-c", "-f", "-", "--remove-files"]
3636

3737
if self.do_gzip():
3838
log_msg = "Archiving and compressing directory: %s" % self.backup_dir
39-
cmd_flags.append("-z")
40-
41-
cmd_flags.append(backup_base_name)
39+
cmd_flags.append(backup_base_name)
40+
additional_flags = ["|", "gzip", "--fast", ">", self.output_file]
41+
cmd_flags.extend(additional_flags)
42+
else:
43+
cmd_flags.append(backup_base_name)
4244
logging.info(log_msg)
4345
self.running = True
4446
self._command = LocalCommand(self.binary, cmd_flags, self.verbose)

0 commit comments

Comments
 (0)