Closed AlexBlokh closed 3 years ago
+1 In general it would be nice to be able to run mongo commands at the admin level from the command line to perform automated maintenance. It appears mongo:connect-admin
does not allow for this. For example, db.products.reIndex();
Pull requests welcome.
The db.repairDatabase()
function is no longer available in mongodb 5 (what we support) and the db.products.reIndex()
call appears to work fine from a mongo:connect-admin
session for me:
root@0872a69de680:/workspaces/mongo# dokku mongo:connect-admin test
> db.products.reIndex()
{
"nIndexesWas" : 1,
"nIndexes" : 1,
"indexes" : [
{
"v" : 2,
"key" : {
"_id" : 1
},
"name" : "_id_"
}
],
"ok" : 1
}
Going to close this for now, but feel free to open a new issue if this is still causing problems.
Is there any way I can run
mongod --repair...
on mongo instance through dokku ??