It's a type of Planche
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

16 lines
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. });