no such cmd: compact

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 1.8.2
    • Component/s: Shell
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      From (http://www.mongodb.org/display/DOCS/compact+Command) I understand I should call the compact command every once in a while, on the slaves, and, as you recommend, run the script (https://github.com/mongodb/mongo-snippets/blob/master/js-scripts/compact-example.js) periodically on the master to have it become a slave and run it too. When connecting directly to the mongod box CLI and running the command, it doesn't seem to understand it:

      rs_1:SECONDARY> db.runCommand(

      {compact:"user",dev:true}

      )
      {
      "errmsg" : "no such cmd: compact",
      "bad cmd" :

      { "compact" : "user", "dev" : true }

      ,
      "ok" : 0
      }

            Assignee:
            Unassigned
            Reporter:
            Arie Grapa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: