Skip to content

Conversation

islue
Copy link
Contributor

@islue islue commented May 11, 2017

  • in case mongodump can_gzip(), the non-default value 'none' will be overwritten. Rolled it back to the former logic. Figure me out if it is done on purpose.
  • pip of recent version doesn't recognize --download-cache.

@timvaillancourt
Copy link
Contributor

timvaillancourt commented May 11, 2017

Thanks @islue.

The tool defaults to using 'gzip' with mongodump if the binary is able to provide that compression so this would be a breaking change to the code.

What I think needs to be done is add a 3rd compression type called 'auto', so we have these options:

  1. 'auto' - automatically use compression if it's available (new default)
  2. 'none' - disable compression
  3. 'gzip' - use gzip encryption explicitly

I am able to implement this if needed.

The --cache-dir fix is already implemented in #129, to be rolled out with 1.0.2.

@timvaillancourt
Copy link
Contributor

timvaillancourt commented May 11, 2017

Hi again @islue.

I ended up implementing this 'auto' compression type in this branch as I ran into other problems that needed this fixed as well.

You can try this out on this branch: https://github.com/Percona-Lab/mongodb_consistent_backup/tree/1.0.2 which also includes the --cache-dir fix for pip.

The default compression is 'auto' and now 'none' should work. Please let me know if this fixes your concerns.

When in 'auto' mode this is logged and gzip is enabled if available:

[2017-05-11 16:43:15,630] [INFO] [MainProcess] [Mongodump:choose_compression:48] Mongodump binary supports gzip compression, auto-enabling gzip compression
[2017-05-11 16:43:15,632] [INFO] [MainProcess] [Task:compression:38] Setting Mongodump compression method: gzip

If compression is 'none' nothing is logged and compression is not used.

@timvaillancourt
Copy link
Contributor

Closed by accident. Reopened

@islue
Copy link
Contributor Author

islue commented May 11, 2017

@timvaillancourt It's OK for me. Thank you.

@islue islue closed this May 11, 2017
@islue islue deleted the mongodump_compression_none branch May 12, 2017 02:45
@timvaillancourt timvaillancourt mentioned this pull request May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants