Difference between revisions of "MongoDB"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 34: | Line 34: | ||
* Backup database to binary JSON ([[BSON]]) files (<code>--out</code>): <code>mongodump --host mongodb1.example.net --port 37017 --username user --password "pass" --out /opt/backup/mongodump-2011-10-24</code> | * Backup database to binary JSON ([[BSON]]) files (<code>--out</code>): <code>mongodump --host mongodb1.example.net --port 37017 --username user --password "pass" --out /opt/backup/mongodump-2011-10-24</code> | ||
* <code>[[mongod]] --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=[[mmapv1]]</code> | * <code>[[mongod]] --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=[[mmapv1]]</code> | ||
+ | * <code>mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 --bind_ip_all</code> | ||
* db.myCollection.find() or db.myCollection.find().pretty() | * db.myCollection.find() or db.myCollection.find().pretty() | ||
Revision as of 13:41, 13 April 2020
wikipedia:MongoDB (2009) is an open-source document-oriented database using a JSON-like documents with schema. Listen by default on port TCP 27017.
- Installation:
brew tap mongodb/brew && brew install [email protected]
- Runnig manually:
mongod --config /usr/local/etc/mongod.conf --fork
Contents
Features
- Ad-hoc queries
- Indexing
- Sharding
- Replication
- Load balancing
- File storage
- Aggregation
- Server-side JavaScript execution
- Capped collections
- ACID transactions
Binaries
Editions
- MongoDB Community Server
Configuration
/etc/mongod.conf
Commands
- Connect to mongoDB:
mongo
ormongo --host IP_TO_CONNECT
- List database:
show dbs
orshow databases
- Connect to a database:
use <your_db_name>
- Backup your_db_name database to a file (
--archive
):mongodump --archive=test.20150715.archive --db your_db_name
- Backup database to binary JSON (BSON) files (
--out
):mongodump --host mongodb1.example.net --port 37017 --username user --password "pass" --out /opt/backup/mongodump-2011-10-24
mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 --bind_ip_all
- db.myCollection.find() or db.myCollection.find().pretty()
Customers
Related terms
- Atlas database
- Eliot Horowitz CTO and founder
Activities
- Read about MongoDB replication capabilities https://docs.mongodb.com/manual/faq/replica-sets/
See also
- traefik
- Cassandra
- MongoDB: MongoDB Compass,
mongo
,mongodump, mongorestore
,mongoexport
, MongoDB changelog, MongoDB Enterprise Kubernetes Operator, GridFS, MongoDB Atlas, MongoDB replication, Ops Manager, docker logs mongodb, show collections, show dbs,mongo --help
- RocketChat, MongoDB, GridFS
- Databases: Database management, SQL, NoSQL, Wide column, PostgreSQL, MariaDB, MySQL, Derby DB, MongoDB, Cassandra, SQLite, HSQL2, H2, RocksDB, Microsoft SQL Server, DB2, Oracle Database, Memcached, Berkeley DB, Collation, SingleStore, Amazon Aurora, Graph database, Amazon DynamoDB, PrestoDB, Cache hit ratio, ACID, WAL, ARIES, DBMS, OLTP, OLAP, Database Schema, CockroachDB, Tables, Views, Apache Druid, RDMS
Advertising: