You can use HomeBrew, see the official MongoDB HomeBrew page.
Just add the tap:
brew tap mongodb/brew
And then after adding the tap from above, you can then install the Mongo shell with:
brew install mongodb-community-shell
For the people who will come here in the future the issue was, I was using MongoDB 4.0 on the local and server was on 4.2:
Starting in version 4.2, mongodump uses Extended JSON v2.0 (Canonical) format for the metadata files. To parse these files for restore, use mongorestore version 4.2+ that supports Extended JSON v2.0 (Canonical or Relaxed mode) format.
The rolling index build procedure is recommended. Here is what they say in the doc:
To minimize the impact of building an index on replica sets and sharded clusters, use a rolling index build procedure as described on Build Indexes on Replica Sets.
for more info:
The short answer is: No, you will not be blocked.
When performing multi-document write operations, whether through a single write operation or multiple write operations, other operations may interleave.
The long explains are:
Collection is granular level (or the resource).
Whenever there is a write operation, Exclusive (X) lock mode must be applied on ...
Answer to all you questions is YES.
You can just add (rs.add()) new nodes to RS and data will be synced. Faster way to do that is create those new nodes from backup/snapshot of old node and then rs.add().
What comes to upgrade, if you are just upgrading to new version of MongoD, there is no need to prepare new nodes and then add them to RS, but of course ...
If you absolutely need to give direct database access to someone, then go with option a) and all that it entails.
Else, then go with option b).
Option a) is a poor choice because, as of right now (MongoDB 4.2), permission granularity is still at collection level. This means that if users have write access to the same collection, they can overwrite ...
If the problem is related to a remote access, here is the solution for anyone who has the problem
show iptable rules line numbers
sudo iptables -L --line-numbers
The output will be something like this
num target prot opt source destination
1 ACCEPT all -- anywhere anywhere ctstate RELATED,...