It's a type of Planche
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 satır
606B

  1. https://gist.github.com/BlakeGardner/8548102
  2. mongo "mongodb://admin:$(salt-call pillar.get mongodb:server:admin:password --out=newline_values_only)@localhost/?authSource=admin&ssl=false"
  3. rs.secondaryOk();
  4. db.getMongo().getDBNames().forEach(function(dbName) {
  5. if (!(["local", "admin", "system"].includes(dbName))) {
  6. var subject = db.getSiblingDB(dbName);
  7. subject.getCollectionNames().forEach(function (collectionName) {
  8. print('Compacting: ' +dbName + " - " + collectionName);
  9. subject.runCommand({ compact: collectionName, force: true });
  10. });
  11. }
  12. });