Skip to content

Commit

Permalink
Add support for standalone database tools
Browse files Browse the repository at this point in the history
Adds a tools command with `stable`, `ls`, and `installed` subcommands.
The server/shell and database tools are now versioned independently.
Changing the version of the server/shell will not update the tools
version. Updating the tools version will not change the server/shell
version.
  • Loading branch information
tfogo committed Aug 13, 2020
1 parent 56c254e commit ae0b985
Show file tree
Hide file tree
Showing 2 changed files with 397 additions and 86 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ Select a MongoDB version without prompting for confirmation if a download is req

$ yes | m 4.0.0

### Downloading MongoDB Database Tools

The Database Tools (mongodump, mongorestore, etc.) are now released separately from the server. You can use `m` to manage your MongoDB Database Tools version independently of your MongoDB server and shell versions.

List available Database Tools versions:

$ m tools ls

List installed Database Tools versions:

$ m tools installed

Use or download the latest stable release of the Database Tools:

$ m tools stable

Use or download a specific version of the Database Tools:

$ m tools 100.0.0

### Removing Binaries

Remove some previously installed versions:
Expand Down Expand Up @@ -199,6 +219,10 @@ Output from `m --help`:
(scripts must use absolute paths)
m pre <event> rm [script] Remove pre <event> script
m post <event> rm [script] Remove post <event> script
m tools stable Install or activate the latest stable Database Tools release
m tools X.Y.Z Install or activate the Database Tools X.Y.Z
m tools ls Output the versions of the Database Tools available
m tools installed [--json] Output installed versions of the Database Tools available
Events:
Expand All @@ -223,7 +247,7 @@ Output from `m --help`:

## Details

By default `m` downloads MongoDB binaries to _/usr/local/m/versions_ in subdirectories named after the release version (3.2.16, 3.4.9, ...). Activated MongoDB binaries are symlinked into the `bin` directory in _/usr/local_. To alter where `m` operates, export the __M_PREFIX__ environment variable with your preferred path prefix.
By default `m` downloads MongoDB binaries to _/usr/local/m/versions_ in subdirectories named after the release version (3.2.16, 3.4.9, ...). MongoDB Database Tools binaries are downloaded to _/usr/local/m/tools/versions_ in subdirectories named after the release version (100.0.0, 100.0.1, ...). Activated MongoDB binaries are symlinked into the `bin` directory in _/usr/local_. To alter where `m` operates, export the __M_PREFIX__ environment variable with your preferred path prefix.

Previously downloaded versions of MongoDB can be activated using `m <version>` or
selected using of the variations in the _Binary Usage_ section above.
Expand Down
Loading

0 comments on commit ae0b985

Please sign in to comment.