For production backup, MongoDB recommends mongodump instead of mongoexport for accuracy of data. However, I would need to "scrub" data off a MongoDB database before backing it up. I am not aware of any server-side data scrubbing options other than mongoexport. Two questions:
- Does mongoexport access MongoDB cache in RAM? Would it alter the working set in RAM like mongodump does?
- mongodump command has this --query option. "Provides a JSON document as a query that optionally limits the documents included in the output of mongodump." Does it take a query to exclude certain fields in a document?
mongodump
or filesystem snapshot backup, or write a custom export ifmongoexport
doesn't do what you need. Any tools or programs that read data frommongod
could alter your working set if your data to export is bigger than avail RAM. Filesystem snapshots are less disruptive