Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7860

mongodump do not work properly in "print to stdout" mode

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • None
    • 2.2.0
    • Tools
    • None
    • logger-01 ~ # uname -a
      Linux logger-01 3.3.8-gentoo #5 SMP Fri Aug 3 11:30:37 MSK 2012 x86_64 Intel(R) Xeon(R) CPU X5650 @ 2.67GHz GenuineIntel GNU/Linux
    • ALL
    • Hide

      execute mongodump --host localhost -d <dbname> -o -

      Show
      execute mongodump --host localhost -d <dbname> -o -

    Description

      when trying to dump the database to the specified dir, it seems ok:
      logger-01 ~ # mongodump --host localhost -d logger -o tmp
      connected to: localhost
      Thu Dec 6 13:31:54 DATABASE: logger to tmp/logger
      Thu Dec 6 13:31:54 logger.xxxxx to tmp/logger/xxxxx.bson
      Thu Dec 6 13:31:54 doing snapshot query
      Thu Dec 6 13:31:54 2 objects
      Thu Dec 6 13:31:54 Metadata for logger.xxxxx to tmp/logger/xxxxx.metadata.json
      Thu Dec 6 13:31:54 logger.SoapTradeApi to tmp/logger/SoapTradeApi.bson
      Thu Dec 6 13:31:54 doing snapshot query
      Thu Dec 6 13:31:57 899600/2592468 34% (objects)
      ^C

      when trying to do the same, but to the stdout:
      logger-01 ~ # mongodump --host localhost -d logger -o -
      connected to: localhost
      Thu Dec 6 13:31:17 You must specify database and collection to print to stdout

      it`s verys usable to send output to the gzip or other compressor and compress the data 'on the fly' with out huge disk usage.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kron Denis Bozhok
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: