Mongodb differs greatly from other relational databases. Basically, mongodb stores json-type data. relational database tables are called collections in mongodb, in mongo, what we originally called a column is called a Document. This article shares some basic information about mongo data backup (export) and restoration (import ).
Mongodb differs greatly from other relational databases. Basically, mongodb stores json-type data. relational database tables are called collections in mongodb, in mongo, what we originally called a column is called a Document. This article shares some basic information about mongo data backup (export) and restoration (import ).
Mongodb differs greatly from other relational databases. Basically, mongodb stores json-type data. relational database tables are called collections in mongodb, in mongo, what we originally called a column is called a Document. This article shares some basic knowledge about mongo data backup (export) and restoration (import ).
1. Data Backup (as exported)
This operation is actually relatively simple. The command is the name of mongodump-d database. After you press enter, a folder named dump will be generated in the current directory, which contains the exported data.
2. Restore or import data
Command: mongorestore-h Host ip: 27017-d target database name -- directoryperdb -- drop backup data directory
For the sake of privacy, I hope I don't mind. Next time I will share with you the basic syntax of groovy.