|
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
}
|