Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2899

Include example of how to run upgradeCheck

      Because the output of the upgradeCheck() helper can be potentially very long, it makes sense to pipe output to a file rather than in the shell directly.

      We should include something like the following example:

      To connect to the admin database on localhost and use secondary:

      # ./mongo --eval "db.getMongo().setSlaveOk();
                      db.upgradeCheckAllDbs()" localhost/admin | tee /tmp/upgradecheck.txt
      

      To connect to the myDb database and check the myColl collection on localhost of a primary, standalone or mongos:

      # ./mongo --eval "db.upgradeCheck({collection:'myColl')" 
                       localhost/myDb | tee /tmp/upgradecheck.txt
      

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              10 years, 8 weeks, 2 days ago