Monog and GitHub Learning

Source: Internet
Author: User

1. Export the server database to local storage in JSON format:
Mongoexport-h ip-d dbname-c User
-O D:\mondb\user.json
2. Import the local JSON into the local project:
d:\developsoftware\mongodb\bin>mongoimport-d dbname-c User--file D:\mondb\u
Ser.json
3. Enter the Monogo database

D:\developsoftware\mongodb\bin>mongoexport-h ip-d dbname-c User
-O D:\mondb\user.json
2015-12-23t19:28:07.434+0800 Connected to:123.57.250.189
2015-12-23t19:28:07.496+0800 Exported Records

d:\developsoftware\mongodb\bin>mongoimport-d dbname-c User--file D:\mondb\u
Ser.json
2015-12-23t19:28:50.987+0800 Connected To:localhost
2015-12-23t19:28:51.006+0800 Imported Documents


D:\developsoftware\mongodb\bin>mongo
2015-12-23t19:28:55.804+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, would zero-out data files
MongoDB Shell version:3.2.0
Connecting To:test
> Use dbname
Switched to DB dbname
> Db.user.findOne ()
{
"_id": ObjectId ("554b4648c72d0a3f078b556a"),
"id": "1",
"username": "AAA",
"Password": "BDDDD",
"Create_time": null
}
> Exit
4.git into the User Center, profile, and then have a library, you can have a search below and enter someone else's username
You can join someone else to the project team

Monog and GitHub Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.