Current location - Quotes Website - Collection of slogans - How mogodb exports data with robomongo
How mogodb exports data with robomongo
1. Start the Mongodb database. Simulate two Mongodb databases under the root directory of E and D disks of your computer, representing the old database and the new database respectively. Because the deployment of Mongodb is very simple, the data files are located in E:\mongodb\data\db (using port 270 17) and D:\mongodb\data\db (using port 27 1 17) respectively. See the figure for details.

2. Connect the new library to view its data. Through the client robomongo-10.0-RC1-Windows-x86 _ 64-496f5c2.zip that comes with Mongodb, find Robomongo.exe after decompression, and right-click to run as an administrator. The interface displayed on the left asks you to select a database to connect to.

3. Connect the old library to check the data. Connect to the old library through the client. As shown in the figure below, the old database contains five document data. Next, we will export 5 pieces of data from the old library by command.

4. Export data from the old library. Export files.chunks (containing document data in binary format) and files.files (containing file information) respectively, and export document data respectively.

5. Import the data into the new library. Similarly, the files exported in the previous step should be imported separately.

6. Connect the new library and check the data. Connect to the new library through the client. As shown in the figure below, we found that five document data were imported.