README.md in mongoid-shell-0.4.2 vs README.md in mongoid-shell-0.4.3
- old
+ new
@@ -37,12 +37,12 @@
```
To specify parameters multiple times, set them to arrays.
``` ruby
-mongodump = Mongoid::Shell::Commands::Mongodump.new(collection: %w(users products))
-system mongodump.to_s # mongodump --collection users --collection products
+mongodump = Mongoid::Shell::Commands::Mongodump.new(excludeCollection: %w(users products))
+system mongodump.to_s # mongodump --excludeCollection users --excludeCollection products
```
Compatibility
-------------
@@ -65,48 +65,48 @@
### Mongodump
Mongodump is a utility for creating a binary export of the contents of a database.
``` ruby
-mongodump = Mongoid::Shell::Commands::Mongodump.new({ collection: 'test' })
+mongodump = Mongoid::Shell::Commands::Mongodump.new(collection: 'test')
mongodump.to_s # mongodump --db test --collection test
```
The `Mongoid::Shell::Commands::Mongodump` class supports `--db`, `--host`, `--username`, `--password`, `--query`, `--out`, `--collection`, `--excludeCollection`, `--excludeCollectionsWithPrefix`, `--directoryperdb`, `--journal`, `--oplog`, `--repair`, `--forceTableScan`, `--dbpath` and `--ipv6`.
### Mongorestore
The mongorestore tool imports content from binary database dump, created by mongodump into a specific database.
``` ruby
-mongorestore = Mongoid::Shell::Commands::Mongorestore.new({ collection: 'test', restore: '/tmp/db_backup' })
+mongorestore = Mongoid::Shell::Commands::Mongorestore.new(collection: 'test', restore: '/tmp/db_backup')
mongorestore.to_s # mongorestore --db test --collection test /tmp/db_backup
```
The `Mongoid::Shell::Commands::Mongorestore` class supports `--db`, `--host`, `--username`, `--password`, `--collection`, `--ipv6`, `--dbpath`, `--directoryperdb`, `--journal`, `--objcheck`, `--filter`, `--drop`, `--oplogReplay`, `--keepIndexVersion` and `--noIndexRestore`.
### Mongoexport
The mongoexport tool produces a JSON or CSV export of data stored in a MongoDB instance.
``` ruby
-mongoexport = Mongoid::Shell::Commands::Mongoexport.new({ collection: 'traffic', out: 'traffic.json' })
+mongoexport = Mongoid::Shell::Commands::Mongoexport.new(collection: 'traffic', out: 'traffic.json')
mongoexport.to_s # mongoexport --db test --collection traffic --out traffic.json
```
-The `Mongoid::Shell::Commands::Mongoexport` class supports '--verbose', '--quiet', '--version', '--port', '--ipv6', '--ssl', '--sslCAFile', '--sslPEMKeyFile', '--sslPEMKeyPassword', '--sslCRLFile', '--sslAllowInvalidCertificates', '--sslAllowInvalidHostnames', '--sslFIPSMode', '--authenticationDatabase', '--authenticationMechanism', '--gssapiServiceName', '--gssapiHostName', '--collection', '--fields', '--fieldFile', '--query', '--csv', '--type', '--out', '--jsonArray', '--pretty', '--slaveOk', '--forceTableScan', '--skip', '--limit', '--sort', '--directoryperdb', '--journal', '--dbpath'.
+The `Mongoid::Shell::Commands::Mongoexport` class supports `--verbose`, `--quiet`, `--version`, `--port`, `--ipv6`, `--ssl`, `--sslCAFile`, `--sslPEMKeyFile`, `--sslPEMKeyPassword`, `--sslCRLFile`, `--sslAllowInvalidCertificates`, `--sslAllowInvalidHostnames`, `--sslFIPSMode`, `--authenticationDatabase`, `--authenticationMechanism`, `--gssapiServiceName`, `--gssapiHostName`, `--collection`, `--fields`, `--fieldFile`, `--query`, `--csv`, `--type`, `--out`, `--jsonArray`, `--pretty`, `--slaveOk`, `--forceTableScan`, `--skip`, `--limit`, `--sort`, `--directoryperdb`, `--journal`, `--dbpath`.
### Mongoimport
The mongoimport tool imports content from an Extended JSON, CSV, or TSV export created by mongoexport, or potentially, another third-party export tool.
``` ruby
-mongoimport = Mongoid::Shell::Commands::Mongoimport.new({ collection: 'contacts', file: 'contacts.json' })
+mongoimport = Mongoid::Shell::Commands::Mongoimport.new(collection: 'contacts', file: 'contacts.json')
mongoimport.to_s # mongoimport --db test --collection contacts --file contacts.json
```
-The `Mongoid::Shell::Commands::Mongoimport` class supports '--verbose', '--quiet', '--version', '--host', '--username', '--password', '--port', '--ipv6', '--ssl', '--sslCAFile', '--sslPEMKeyFile', '--sslPEMKeyPassword', '--sslCRLFile', '--sslAllowInvalidCertificates', '--sslAllowInvalidHostnames', '--sslFIPSMode', '--authenticationDatabase', '--authenticationMechanism', '--gssapiServiceName', '--gssapiHostName', '--db', '--collection', '--fields', '--directoryperdb', '--journal', '--dbpath', '--fieldFile', '--ignoreBlanks', '--type', '--file', '--drop', '--headerline', '--upsert', '--upsertFields', '--stopOnError', '--jsonArray', '--maintainInsertionOrder', '--numInsertionWorkers', '--writeConcern'
+The `Mongoid::Shell::Commands::Mongoimport` class supports `--verbose`, `--quiet`, `--version`, `--host`, `--username`, `--password`, `--port`, `--ipv6`, `--ssl`, `--sslCAFile`, `--sslPEMKeyFile`, `--sslPEMKeyPassword`, `--sslCRLFile`, `--sslAllowInvalidCertificates`, `--sslAllowInvalidHostnames`, `--sslFIPSMode`, `--authenticationDatabase`, `--authenticationMechanism`, `--gssapiServiceName`, `--gssapiHostName`, `--db`, `--collection`, `--fields`, `--directoryperdb`, `--journal`, `--dbpath`, `--fieldFile`, `--ignoreBlanks`, `--type`, `--file`, `--drop`, `--headerline`, `--upsert`, `--upsertFields`, `--stopOnError`, `--jsonArray`, `--maintainInsertionOrder`, `--numInsertionWorkers`, `--writeConcern`.
### Mongostat
The mongostat utility provides a quick overview of the status of a currently running mongod or mongos instance.